Boost C++ Libraries: Ticket #6210: interval customization results in compilation errors https://svn.boost.org/trac10/ticket/6210 <p> Changing of interval bounds type in example boost/libs/icl/example/custom_interval_/custom_interval.cpp to static_closed leads to: </p> <p> boost/icl/concept/interval.hpp: In function 'typename boost::enable_if&lt;boost::icl::has_static_bounds&lt;Type&gt;, bool&gt;::type boost::icl::lower_less(const Type&amp;, const Type&amp;) [with Type = <a class="missing wiki">MyInterval</a>]': boost/icl/concept/interval.hpp:877: instantiated from 'typename boost::enable_if&lt;boost::icl::is_interval&lt;Type&gt;, bool&gt;::type boost::icl::lower_less_equal(const Type&amp;, const Type&amp;) [with Type = <a class="missing wiki">MyInterval</a>]' boost/icl/concept/interval.hpp:1199: instantiated from 'typename boost::enable_if&lt;boost::icl::is_static_closed&lt;Type&gt;, Type&gt;::type boost::icl::right_subtract(Type, const Type&amp;) [with Type = <a class="missing wiki">MyInterval</a>]' boost/icl/concept/interval_set.hpp:249: instantiated from 'typename boost::enable_if&lt;boost::icl::is_interval_set&lt;Type&gt;, Type&gt;::type&amp; boost::icl::flip(Type&amp;, const typename Type::segment_type&amp;) [with Type = boost::icl::interval_set&lt;int, std::less, <a class="missing wiki">MyInterval</a>, std::allocator&gt;]' boost/icl/concept/interval_associator.hpp:772: instantiated from 'typename boost::enable_if&lt;boost::icl::is_intra_derivative&lt;Type, AssociateT&gt;, Type&gt;::type&amp; boost::icl::operator<sup>=(Type&amp;, const OperandT&amp;) [with Type = custom_interval()::<a class="missing wiki">MyIntervalSet</a>, OperandT = <a class="missing wiki">MyInterval</a>]' custom_interval.cpp:80: instantiated from here boost/icl/concept/interval.hpp:728: error: 'const class <a class="missing wiki">MyInterval</a>' has no member named 'lower' boost/icl/concept/interval.hpp:728: error: 'const class <a class="missing wiki">MyInterval</a>' has no member named 'lower' </sup></p> <pre class="wiki">template&lt;&gt; struct interval_bound_type&lt;MyInterval&gt; //4. Finally we define the interval borders. { // Choose between static_open (lo..up) typedef interval_bound_type type; // static_left_open (lo..up] BOOST_STATIC_CONSTANT(bound_type, value = interval_bounds::static_closed);//[lo..up) }; </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6210 Trac 1.4.3 anonymous Mon, 05 Dec 2011 13:14:53 GMT <link>https://svn.boost.org/trac10/ticket/6210#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6210#comment:1</guid> <description> <p> Using of insert method with iterator arguments also results in compilation error. </p> <p> New version of void custom_interval () from the same source file boost/libs/icl/example/custom_interval_/custom_interval.cpp (with interval_bound_type &lt;<a class="missing wiki">MyInterval</a>&gt;::value = interval_bounds::static_right_open): </p> <pre class="wiki">void custom_interval() { // Now we can use class MyInterval with interval containers: typedef interval_set&lt;int, std::less, MyInterval&gt; MyIntervalSet; MyIntervalSet mySet; mySet += MyInterval(1,9); cout &lt;&lt; mySet &lt;&lt; endl; mySet.subtract(3) -= 6; cout &lt;&lt; mySet &lt;&lt; " subtracted 3 and 6\n"; mySet ^= MyInterval(2,8); cout &lt;&lt; mySet &lt;&lt; " flipped between 2 and 7\n"; MyIntervalSet::iterator it = mySet.insert (mySet.end (), MyInterval (6, 8)); } </pre><p> Compilation error: </p> <pre class="wiki">./boost/icl/concept/interval.hpp: In function 'typename boost::enable_if&lt;boost::icl::is_asymmetric_interval&lt;Type&gt;, bool&gt;::type boost::icl::upper_equal(const Type&amp;, const Type&amp;) [with Type = MyInterval]': ./boost/icl/concept/interval.hpp:894: instantiated from 'typename boost::enable_if&lt;boost::icl::is_interval&lt;Type&gt;, bool&gt;::type boost::icl::operator==(const Type&amp;, const Type&amp;) [with Type = MyInterval]' ./boost/icl/interval_base_set.hpp:495: instantiated from 'typename boost::icl::interval_base_set&lt;SubType, DomainT, Compare, Interval, Alloc&gt;::iterator boost::icl::interval_base_set&lt;SubType, DomainT, Compare, Interval, Alloc&gt;::_add(typename std::set&lt;Interval, boost::icl::exclusive_less_than&lt;Interval&gt;, Alloc&lt;Interval&gt; &gt;::iterator, const Interval&amp;) [with SubType = boost::icl::interval_set&lt;int, std::less, MyInterval, std::allocator&gt;, DomainT = int, Compare = std::less, Interval = MyInterval, Alloc = std::allocator]' ./boost/icl/interval_base_set.hpp:239: instantiated from 'typename std::set&lt;Interval, boost::icl::exclusive_less_than&lt;Interval&gt;, Alloc&lt;Interval&gt; &gt;::iterator boost::icl::interval_base_set&lt;SubType, DomainT, Compare, Interval, Alloc&gt;::add(typename std::set&lt;Interval, boost::icl::exclusive_less_than&lt;Interval&gt;, Alloc&lt;Interval&gt; &gt;::iterator, const Interval&amp;) [with SubType = boost::icl::interval_set&lt;int, std::less, MyInterval, std::allocator&gt;, DomainT = int, Compare = std::less, Interval = MyInterval, Alloc = std::allocator]' ./boost/icl/interval_base_set.hpp:275: instantiated from 'typename std::set&lt;Interval, boost::icl::exclusive_less_than&lt;Interval&gt;, Alloc&lt;Interval&gt; &gt;::iterator boost::icl::interval_base_set&lt;SubType, DomainT, Compare, Interval, Alloc&gt;::insert(typename std::set&lt;Interval, boost::icl::exclusive_less_than&lt;Interval&gt;, Alloc&lt;Interval&gt; &gt;::iterator, const Interval&amp;) [with SubType = boost::icl::interval_set&lt;int, std::less, MyInterval, std::allocator&gt;, 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&lt;boost::icl::is_asymmetric_interval&lt;Type&gt;, bool&gt;::type boost::icl::lower_equal(const Type&amp;, const Type&amp;) [with Type = MyInterval]': ./boost/icl/concept/interval.hpp:894: instantiated from 'typename boost::enable_if&lt;boost::icl::is_interval&lt;Type&gt;, bool&gt;::type boost::icl::operator==(const Type&amp;, const Type&amp;) [with Type = MyInterval]' ./boost/icl/interval_base_set.hpp:495: instantiated from 'typename boost::icl::interval_base_set&lt;SubType, DomainT, Compare, Interval, Alloc&gt;::iterator boost::icl::interval_base_set&lt;SubType, DomainT, Compare, Interval, Alloc&gt;::_add(typename std::set&lt;Interval, boost::icl::exclusive_less_than&lt;Interval&gt;, Alloc&lt;Interval&gt; &gt;::iterator, const Interval&amp;) [with SubType = boost::icl::interval_set&lt;int, std::less, MyInterval, std::allocator&gt;, DomainT = int, Compare = std::less, Interval = MyInterval, Alloc = std::allocator]' ./boost/icl/interval_base_set.hpp:239: instantiated from 'typename std::set&lt;Interval, boost::icl::exclusive_less_than&lt;Interval&gt;, Alloc&lt;Interval&gt; &gt;::iterator boost::icl::interval_base_set&lt;SubType, DomainT, Compare, Interval, Alloc&gt;::add(typename std::set&lt;Interval, boost::icl::exclusive_less_than&lt;Interval&gt;, Alloc&lt;Interval&gt; &gt;::iterator, const Interval&amp;) [with SubType = boost::icl::interval_set&lt;int, std::less, MyInterval, std::allocator&gt;, DomainT = int, Compare = std::less, Interval = MyInterval, Alloc = std::allocator]' ./boost/icl/interval_base_set.hpp:275: instantiated from 'typename std::set&lt;Interval, boost::icl::exclusive_less_than&lt;Interval&gt;, Alloc&lt;Interval&gt; &gt;::iterator boost::icl::interval_base_set&lt;SubType, DomainT, Compare, Interval, Alloc&gt;::insert(typename std::set&lt;Interval, boost::icl::exclusive_less_than&lt;Interval&gt;, Alloc&lt;Interval&gt; &gt;::iterator, const Interval&amp;) [with SubType = boost::icl::interval_set&lt;int, std::less, MyInterval, std::allocator&gt;, 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' </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>Joachim Faulhaber</dc:creator> <pubDate>Mon, 05 Dec 2011 22:52:39 GMT</pubDate> <title>status, milestone changed https://svn.boost.org/trac10/ticket/6210#comment:2 https://svn.boost.org/trac10/ticket/6210#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.49.0</span> </li> </ul> <p> Thanks for sending in this bug report. I will fix the bug immediately. Regards, Joachim </p> Ticket Joachim Faulhaber Thu, 26 Jan 2012 07:28:28 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/6210#comment:3 https://svn.boost.org/trac10/ticket/6210#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> Ticket