Re: [Boost-bugs] [Boost C++ Libraries] #6210: interval customization results in compilation errors

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #6210: interval customization results in compilation errors
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-12-05 13:14:53


#6210: interval customization results in compilation errors
-------------------------------+--------------------------------------------
  Reporter: opium | Owner: jofaber
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: ICL
   Version: Boost 1.47.0 | Severity: Problem
Resolution: | Keywords: ICL, interval customization, static_closed bounds, compilation error
-------------------------------+--------------------------------------------

Comment (by anonymous):

 Using of insert method with iterator arguments also results in compilation
 error.

 New version of void custom_interval () from the same source file
 boost/libs/icl/example/custom_interval_/custom_interval.cpp (with
 interval_bound_type <MyInterval>::value =
 interval_bounds::static_right_open):

 {{{
 void custom_interval()
 {
     // Now we can use class MyInterval with interval containers:
     typedef interval_set<int, std::less, MyInterval> MyIntervalSet;
     MyIntervalSet mySet;
     mySet += MyInterval(1,9);
     cout << mySet << endl;
     mySet.subtract(3) -= 6;
     cout << mySet << " subtracted 3 and 6\n";
     mySet ^= MyInterval(2,8);
     cout << mySet << " flipped between 2 and 7\n";

     MyIntervalSet::iterator it = mySet.insert (mySet.end (), MyInterval
 (6, 8));
 }

 }}}

 Compilation error:

 {{{
 ./boost/icl/concept/interval.hpp: In function 'typename
 boost::enable_if<boost::icl::is_asymmetric_interval<Type>, bool>::type
 boost::icl::upper_equal(const Type&, const Type&) [with Type =
 MyInterval]':
 ./boost/icl/concept/interval.hpp:894: instantiated from 'typename
 boost::enable_if<boost::icl::is_interval<Type>, bool>::type
 boost::icl::operator==(const Type&, const Type&) [with Type = MyInterval]'
 ./boost/icl/interval_base_set.hpp:495: instantiated from 'typename
 boost::icl::interval_base_set<SubType, DomainT, Compare, Interval,
 Alloc>::iterator boost::icl::interval_base_set<SubType, DomainT, Compare,
 Interval, Alloc>::_add(typename std::set<Interval,
 boost::icl::exclusive_less_than<Interval>, Alloc<Interval> >::iterator,
 const Interval&) [with SubType = boost::icl::interval_set<int, std::less,
 MyInterval, std::allocator>, DomainT = int, Compare = std::less, Interval
 = MyInterval, Alloc = std::allocator]'
 ./boost/icl/interval_base_set.hpp:239: instantiated from 'typename
 std::set<Interval, boost::icl::exclusive_less_than<Interval>,
 Alloc<Interval> >::iterator boost::icl::interval_base_set<SubType,
 DomainT, Compare, Interval, Alloc>::add(typename std::set<Interval,
 boost::icl::exclusive_less_than<Interval>, Alloc<Interval> >::iterator,
 const Interval&) [with SubType = boost::icl::interval_set<int, std::less,
 MyInterval, std::allocator>, DomainT = int, Compare = std::less, Interval
 = MyInterval, Alloc = std::allocator]'
 ./boost/icl/interval_base_set.hpp:275: instantiated from 'typename
 std::set<Interval, boost::icl::exclusive_less_than<Interval>,
 Alloc<Interval> >::iterator boost::icl::interval_base_set<SubType,
 DomainT, Compare, Interval, Alloc>::insert(typename std::set<Interval,
 boost::icl::exclusive_less_than<Interval>, Alloc<Interval> >::iterator,
 const Interval&) [with SubType = boost::icl::interval_set<int, std::less,
 MyInterval, std::allocator>, DomainT = int, Compare = std::less, Interval
 = MyInterval, Alloc = std::allocator]'
 custom_interval.cpp:83: instantiated from here
 ./boost/icl/concept/interval.hpp:847: error: 'const class MyInterval' has
 no member named 'upper'
 ./boost/icl/concept/interval.hpp:847: error: 'const class MyInterval' has
 no member named 'upper'
 ./boost/icl/concept/interval.hpp: In function 'typename
 boost::enable_if<boost::icl::is_asymmetric_interval<Type>, bool>::type
 boost::icl::lower_equal(const Type&, const Type&) [with Type =
 MyInterval]':
 ./boost/icl/concept/interval.hpp:894: instantiated from 'typename
 boost::enable_if<boost::icl::is_interval<Type>, bool>::type
 boost::icl::operator==(const Type&, const Type&) [with Type = MyInterval]'
 ./boost/icl/interval_base_set.hpp:495: instantiated from 'typename
 boost::icl::interval_base_set<SubType, DomainT, Compare, Interval,
 Alloc>::iterator boost::icl::interval_base_set<SubType, DomainT, Compare,
 Interval, Alloc>::_add(typename std::set<Interval,
 boost::icl::exclusive_less_than<Interval>, Alloc<Interval> >::iterator,
 const Interval&) [with SubType = boost::icl::interval_set<int, std::less,
 MyInterval, std::allocator>, DomainT = int, Compare = std::less, Interval
 = MyInterval, Alloc = std::allocator]'
 ./boost/icl/interval_base_set.hpp:239: instantiated from 'typename
 std::set<Interval, boost::icl::exclusive_less_than<Interval>,
 Alloc<Interval> >::iterator boost::icl::interval_base_set<SubType,
 DomainT, Compare, Interval, Alloc>::add(typename std::set<Interval,
 boost::icl::exclusive_less_than<Interval>, Alloc<Interval> >::iterator,
 const Interval&) [with SubType = boost::icl::interval_set<int, std::less,
 MyInterval, std::allocator>, DomainT = int, Compare = std::less, Interval
 = MyInterval, Alloc = std::allocator]'
 ./boost/icl/interval_base_set.hpp:275: instantiated from 'typename
 std::set<Interval, boost::icl::exclusive_less_than<Interval>,
 Alloc<Interval> >::iterator boost::icl::interval_base_set<SubType,
 DomainT, Compare, Interval, Alloc>::insert(typename std::set<Interval,
 boost::icl::exclusive_less_than<Interval>, Alloc<Interval> >::iterator,
 const Interval&) [with SubType = boost::icl::interval_set<int, std::less,
 MyInterval, std::allocator>, DomainT = int, Compare = std::less, Interval
 = MyInterval, Alloc = std::allocator]'
 custom_interval.cpp:83: instantiated from here
 ./boost/icl/concept/interval.hpp:816: error: 'const class MyInterval' has
 no member named 'lower'
 ./boost/icl/concept/interval.hpp:816: error: 'const class MyInterval' has
 no member named 'lower'
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6210#comment:1>
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:08 UTC