On 24/02/11 11:51, Joachim Faulhaber wrote:
(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.
We are still talking about static intervals. You did try setting the
#define for static intervals? If you did, then my minimal example
consists of putting the code above in the function f() below:
#define BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
#include