id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 5559,interval_set works not correct with custom compare function,denis@…,Joachim Faulhaber,"Just catch a bug: interval_set works not correct with custom compare function. Here is the test case, it fails with boost 1.46.1 and truck version (23 May 2011, svn revision 72124). It works ok with default std::less comparator. Of course, it is weird to use std::greater with int as it is in this listing. Here is a simplified test case, I got the bug using a custom datatype (int64_t inside) with a custom comparator. I did not investigated it yet. It looks like icl::succ and icl::pred should be customized together with comparator. {{{ #include #include #include #include int main() { typedef boost::icl::interval_set Set; Set q1( Set::interval_type::closed(UINT32_MAX, 0) ); Set q2( Set::interval_type::closed(1000, 100) ); Set q3( Set::interval_type::closed(1, 1) ); Set q4( Set::interval_type::closed(1, 0) ); Set q5( Set::interval_type::closed(0, 0) ); std::cout << q1 << "" + "" << q2 << "" = "" << (q1+q2) << std::endl; // ok std::cout << q1 << "" + "" << q3 << "" = "" << (q1+q3) << std::endl; // incorrect result std::cout << q1 << "" + "" << q4 << "" = "" << (q1+q4) << std::endl; // incorrect result std::cout << q1 << "" + "" << q5 << "" = "" << (q1+q5) << std::endl; // assertion inside icl assert(q1 == q1+q2); assert(q1 == q1+q3); assert(q1 == q1+q4); assert(q1 == q1+q5); } }}}",Bugs,closed,Boost 1.47.0,ICL,Boost 1.46.1,Problem,fixed,,