Boost logo

Boost Users :

Subject: Re: [Boost-users] [boost][boost-users][ICL] ICL Compilation errors. Ticket #5207
From: John Reid (j.reid_at_[hidden])
Date: 2011-02-24 07:46:05


On 24/02/11 11:51, Joachim Faulhaber wrote:
> (3) More compilability issues
>
> 2011/2/23 John Reid<j.reid_at_[hidden]>:
>> 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 <boost/icl/interval_set.hpp>
#include <boost/icl/interval_map.hpp>

void f() {
        namespace icl = ::boost::icl;
}


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net