(3) More compilability issues
2011/2/23 John Reid
I'm interested to hear reasons why the following don't compile when using static bounds:
icl::add( icl::interval_set< int >(), 0 ); icl::add( icl::interval_set< int >(), icl::interval< int >::type( 0, 1 ) ); icl::interval_set< int >() += 0; icl::interval_set< int >() += icl::interval< int >::type( 0, 1 );
icl::subtract( icl::interval_set< int >(), 0 ); icl::subtract( icl::interval_set< int >(), icl::interval< int >::type( 0, 1 ) ); icl::interval_set< int >() -= 0; icl::interval_set< int >() -= icl::interval< int >::type( 0, 1 );
icl::interval_set< int >() &= 0; icl::interval_set< int >() &= icl::interval< int >::type( 0, 1 );
icl::interval_set< int >() ^= ( icl::interval< int >::type( 0, 1 ) );
They all seem reasonable operations to me. In particular, for a discrete domain, operations like icl::interval_set< int >() += 0 make sense to me. That is the following are equivalent: icl::interval_set< int >() += 0 icl::interval_set< int >() += icl::interval< int >::type( 0, 1 );
Yes, you are right! The code you are giving should compile and it actually compiles on my machine with different msvc compilers. I guess it also compiles for gcc. If the problem persists try to generate a minimal code example so I can look again. Best regards, Joachim -- Interval Container Library [Boost.Icl] http://www.joachim-faulhaber.de