[Boost-bugs] [Boost C++ Libraries] #7231: Boost ICL "party" example fails compilation using Clang 3.1

Subject: [Boost-bugs] [Boost C++ Libraries] #7231: Boost ICL "party" example fails compilation using Clang 3.1
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-08-14 15:52:18


#7231: Boost ICL "party" example fails compilation using Clang 3.1
-------------------------------------------------------+--------------------
 Reporter: Jess Morecroft <jess.morecroft@…> | Owner: jofaber
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: ICL
  Version: Boost 1.49.0 | Severity: Problem
 Keywords: clang icl |
-------------------------------------------------------+--------------------
 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)

 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! ...

 {{{
 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<std::set<std::basic_string<char>,
 std::less<std::basic_string<char>>,
       std::allocator<std::basic_string<char>>> >::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<boost::icl::interval_map<boost::posix_time::ptime,
       std::set<std::basic_string<char>,
 std::less<std::basic_string<char>>,
 std::allocator<std::basic_string<char>>>,
       boost::icl::partial_absorber, std::less, icl::inplace_plus,
 icl::inter_section,
       boost::icl::discrete_interval<boost::posix_time::ptime, less>,
 std::allocator>, boost::posix_time::ptime,
       std::set<std::basic_string<char>,
 std::less<std::basic_string<char>>,
 std::allocator<std::basic_string<char>>>,
       boost::icl::partial_absorber, less, inplace_plus, inter_section,
       boost::icl::discrete_interval<boost::posix_time::ptime, less>,
 allocator>::add_segment<boost::icl::inplace_plus<std::set<std::basic_string<char>,
       std::less<std::basic_string<char>>,
 std::allocator<std::basic_string<char>>>> >' requested here
         add_segment<Combiner>(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<boost::icl::interval_map<boost::posix_time::ptime,
       std::set<std::basic_string<char>,
 std::less<std::basic_string<char>>,
 std::allocator<std::basic_string<char>>>,
       boost::icl::partial_absorber, std::less, icl::inplace_plus,
 icl::inter_section,
       boost::icl::discrete_interval<boost::posix_time::ptime, less>,
 std::allocator>, boost::posix_time::ptime,
       std::set<std::basic_string<char>,
 std::less<std::basic_string<char>>,
 std::allocator<std::basic_string<char>>>,
       boost::icl::partial_absorber, less, inplace_plus, inter_section,
       boost::icl::discrete_interval<boost::posix_time::ptime, less>,
 allocator>::add_main<boost::icl::inplace_plus<std::set<std::basic_string<char>,
       std::less<std::basic_string<char>>,
 std::allocator<std::basic_string<char>>>> >' requested here
         add_main<Combiner>(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<boost::icl::interval_map<boost::posix_time::ptime,
       std::set<std::basic_string<char>,
 std::less<std::basic_string<char>>,
 std::allocator<std::basic_string<char>>>,
       boost::icl::partial_absorber, std::less, icl::inplace_plus,
 icl::inter_section,
       boost::icl::discrete_interval<boost::posix_time::ptime, less>,
 std::allocator>, boost::posix_time::ptime,
       std::set<std::basic_string<char>,
 std::less<std::basic_string<char>>,
 std::allocator<std::basic_string<char>>>,
       boost::icl::partial_absorber, less, inplace_plus, inter_section,
       boost::icl::discrete_interval<boost::posix_time::ptime, less>,
 allocator>::_add<boost::icl::inplace_plus<std::set<std::basic_string<char>,
 std::less<std::basic_string<char>>,
       std::allocator<std::basic_string<char>>>> >' requested here
         this->template _add<codomain_combine>(interval_value_pair);
                        ^
 test.cpp:32:11: note: in instantiation of member function
 'boost::icl::interval_base_map<boost::icl::interval_map<boost::posix_time::ptime,
       std::set<std::basic_string<char>,
 std::less<std::basic_string<char>>,
 std::allocator<std::basic_string<char>>>,
       boost::icl::partial_absorber, std::less, icl::inplace_plus,
 icl::inter_section,
       boost::icl::discrete_interval<boost::posix_time::ptime, less>,
 std::allocator>, boost::posix_time::ptime,
       std::set<std::basic_string<char>,
 std::less<std::basic_string<char>>,
 std::allocator<std::basic_string<char>>>,
       boost::icl::partial_absorber, less, inplace_plus, inter_section,
       boost::icl::discrete_interval<boost::posix_time::ptime, less>,
 allocator>::add' requested here
     party.add( // add and element
           ^
 1 error generated.

 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7231>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:10 UTC