Boost C++ Libraries: Ticket #7231: Boost ICL "party" example fails compilation using Clang 3.1 https://svn.boost.org/trac10/ticket/7231 <p> Test program copied exactly from "party" example in boost icl documentation (attached). Compile fails on Mac OS X 10.8 (ML) using latest Clang - version below. (compiles OK using gcc) </p> <p> Looks like Clang is not picking up the operator+= template in the concept header? Probably a Clang bug and if so sorry for the ticket! ... </p> <pre class="wiki">jessmorecroft:~$ c++ --version Apple clang version 4.0 (tags/Apple/clang-421.0.57) (based on LLVM 3.1svn) Target: x86_64-apple-darwin12.0.0 Thread model: posix jessmorecroft:~$ c++ test.cpp In file included from test.cpp:5: In file included from /usr/local/include/boost/icl/interval_map.hpp:13: In file included from /usr/local/include/boost/icl/interval_set.hpp:14: In file included from /usr/local/include/boost/icl/interval_base_set.hpp:24: In file included from /usr/local/include/boost/icl/associative_interval_container.hpp:16: In file included from /usr/local/include/boost/icl/concept/interval_set.hpp:13: In file included from /usr/local/include/boost/icl/detail/set_algo.hpp:16: /usr/local/include/boost/icl/functors.hpp:71:18: error: no viable overloaded '+=' { object += operand; } ~~~~~~ ^ ~~~~~~~ /usr/local/include/boost/icl/interval_base_map.hpp:855:5: note: in instantiation of member function 'boost::icl::inplace_plus&lt;std::set&lt;std::basic_string&lt;char&gt;, std::less&lt;std::basic_string&lt;char&gt;&gt;, std::allocator&lt;std::basic_string&lt;char&gt;&gt;&gt; &gt;::operator()' requested here Combiner()((*it_).second, co_val); ^ /usr/local/include/boost/icl/interval_base_map.hpp:870:9: note: in instantiation of function template specialization 'boost::icl::interval_base_map&lt;boost::icl::interval_map&lt;boost::posix_time::ptime, std::set&lt;std::basic_string&lt;char&gt;, std::less&lt;std::basic_string&lt;char&gt;&gt;, std::allocator&lt;std::basic_string&lt;char&gt;&gt;&gt;, boost::icl::partial_absorber, std::less, icl::inplace_plus, icl::inter_section, boost::icl::discrete_interval&lt;boost::posix_time::ptime, less&gt;, std::allocator&gt;, boost::posix_time::ptime, std::set&lt;std::basic_string&lt;char&gt;, std::less&lt;std::basic_string&lt;char&gt;&gt;, std::allocator&lt;std::basic_string&lt;char&gt;&gt;&gt;, boost::icl::partial_absorber, less, inplace_plus, inter_section, boost::icl::discrete_interval&lt;boost::posix_time::ptime, less&gt;, allocator&gt;::add_segment&lt;boost::icl::inplace_plus&lt;std::set&lt;std::basic_string&lt;char&gt;, std::less&lt;std::basic_string&lt;char&gt;&gt;, std::allocator&lt;std::basic_string&lt;char&gt;&gt;&gt;&gt; &gt;' requested here add_segment&lt;Combiner&gt;(inter_val, co_val, it_); ^ /usr/local/include/boost/icl/interval_base_map.hpp:966:9: note: in instantiation of function template specialization 'boost::icl::interval_base_map&lt;boost::icl::interval_map&lt;boost::posix_time::ptime, std::set&lt;std::basic_string&lt;char&gt;, std::less&lt;std::basic_string&lt;char&gt;&gt;, std::allocator&lt;std::basic_string&lt;char&gt;&gt;&gt;, boost::icl::partial_absorber, std::less, icl::inplace_plus, icl::inter_section, boost::icl::discrete_interval&lt;boost::posix_time::ptime, less&gt;, std::allocator&gt;, boost::posix_time::ptime, std::set&lt;std::basic_string&lt;char&gt;, std::less&lt;std::basic_string&lt;char&gt;&gt;, std::allocator&lt;std::basic_string&lt;char&gt;&gt;&gt;, boost::icl::partial_absorber, less, inplace_plus, inter_section, boost::icl::discrete_interval&lt;boost::posix_time::ptime, less&gt;, allocator&gt;::add_main&lt;boost::icl::inplace_plus&lt;std::set&lt;std::basic_string&lt;char&gt;, std::less&lt;std::basic_string&lt;char&gt;&gt;, std::allocator&lt;std::basic_string&lt;char&gt;&gt;&gt;&gt; &gt;' requested here add_main&lt;Combiner&gt;(rest_interval, co_val, it_, last_); ^ /usr/local/include/boost/icl/interval_base_map.hpp:314:24: note: in instantiation of function template specialization 'boost::icl::interval_base_map&lt;boost::icl::interval_map&lt;boost::posix_time::ptime, std::set&lt;std::basic_string&lt;char&gt;, std::less&lt;std::basic_string&lt;char&gt;&gt;, std::allocator&lt;std::basic_string&lt;char&gt;&gt;&gt;, boost::icl::partial_absorber, std::less, icl::inplace_plus, icl::inter_section, boost::icl::discrete_interval&lt;boost::posix_time::ptime, less&gt;, std::allocator&gt;, boost::posix_time::ptime, std::set&lt;std::basic_string&lt;char&gt;, std::less&lt;std::basic_string&lt;char&gt;&gt;, std::allocator&lt;std::basic_string&lt;char&gt;&gt;&gt;, boost::icl::partial_absorber, less, inplace_plus, inter_section, boost::icl::discrete_interval&lt;boost::posix_time::ptime, less&gt;, allocator&gt;::_add&lt;boost::icl::inplace_plus&lt;std::set&lt;std::basic_string&lt;char&gt;, std::less&lt;std::basic_string&lt;char&gt;&gt;, std::allocator&lt;std::basic_string&lt;char&gt;&gt;&gt;&gt; &gt;' requested here this-&gt;template _add&lt;codomain_combine&gt;(interval_value_pair); ^ test.cpp:32:11: note: in instantiation of member function 'boost::icl::interval_base_map&lt;boost::icl::interval_map&lt;boost::posix_time::ptime, std::set&lt;std::basic_string&lt;char&gt;, std::less&lt;std::basic_string&lt;char&gt;&gt;, std::allocator&lt;std::basic_string&lt;char&gt;&gt;&gt;, boost::icl::partial_absorber, std::less, icl::inplace_plus, icl::inter_section, boost::icl::discrete_interval&lt;boost::posix_time::ptime, less&gt;, std::allocator&gt;, boost::posix_time::ptime, std::set&lt;std::basic_string&lt;char&gt;, std::less&lt;std::basic_string&lt;char&gt;&gt;, std::allocator&lt;std::basic_string&lt;char&gt;&gt;&gt;, boost::icl::partial_absorber, less, inplace_plus, inter_section, boost::icl::discrete_interval&lt;boost::posix_time::ptime, less&gt;, allocator&gt;::add' requested here party.add( // add and element ^ 1 error generated. </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7231 Trac 1.4.3 Jess Morecroft <jess.morecroft@…> Tue, 14 Aug 2012 15:52:55 GMT attachment set https://svn.boost.org/trac10/ticket/7231 https://svn.boost.org/trac10/ticket/7231 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">test.cpp</span> </li> </ul> Ticket Joachim Faulhaber Sat, 25 Aug 2012 07:44:54 GMT <link>https://svn.boost.org/trac10/ticket/7231#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7231#comment:1</guid> <description> <p> Hello Jess, </p> <p> thank you for sending in this report. Unfortunately there are a number of issues with clang and icl. Those seem to be compiler bugs of clang since all other compilers agree in compiling the code correctly. </p> <p> You could help the clang developers by boiling down those use cases to minimal examples and file tickets to the llvm/clang bug tracker. I'd be interested in such minimal examples as well and would insert them into my test suite. </p> <p> Currently I won't be able to perform work on this myself. </p> <p> Regrads, Joachim </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Joachim Faulhaber</dc:creator> <pubDate>Mon, 31 Dec 2012 01:29:09 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/7231#comment:2 https://svn.boost.org/trac10/ticket/7231#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> Ticket xprog66@… Fri, 09 Aug 2013 23:34:43 GMT <link>https://svn.boost.org/trac10/ticket/7231#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7231#comment:3</guid> <description> <p> boost 1.53 fixes this issue. </p> <p> I could compile with clang 3.2.1 in ubuntu 12.10 </p> </description> <category>Ticket</category> </item> </channel> </rss>