
On 21/02/11 20:22, Joachim Faulhaber wrote:
Hi John, lists,
BOOST_AUTO_TEST_CASE(ticket_5207) { icl::interval< int>::type int_interval; icl::interval_set< int> int_set; icl::interval_map< int, int> int_map; icl::interval_map< int, int>::element_type int_element; icl::interval_map< int, int>::segment_type int_segment;
// The next 4 lines compile icl::lower( int_interval ); icl::upper( int_interval ); icl::first( int_interval ); icl::last( int_interval ); my mistake
// The next 4 lines are *not* supposed to compile // according to the docs: icl::add( int_set, int_set ); icl::add( int_map, int_map ); icl::subtract( int_set, int_set ); icl::subtract( int_map, int_map ); agreed
int_set += int_interval; // compiles
// Here you are right, John: // The next 4 lines should compile according // to the docs, but don't icl::disjoint( int_map, int_element ); icl::disjoint( int_map, int_segment ); icl::intersects( int_map, int_segment ); icl::intersects( int_map, int_element ); // Those four are pretty special. I doubt anyone will // use them. But I will complete the library here. }
Thanks for using my library and helping to improve it. NP, thanks for writing it!
I have started to use statically bounded intervals and am finding more compilation issues. For example with finding elements in a map: #define BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS #include <boost/icl/interval_map.hpp> void f() { namespace icl = ::boost::icl; icl::interval_map< float, int >().find( 0 ); } This compiles without the #define but fails on static intervals. This makes me think it might be worth having tests for every possible combination that is listed in the function synopsis for both static and for dynamic intervals: http://www.boost.org/doc/libs/1_46_0/libs/icl/doc/html/boost_icl/interface/f... I can keep you up-to-date with any further problems I find but I'm just wondering whether it would be easier to fix them all in one go. I'm using gcc 4.4.3 with boost trunk svn 69120