Boost logo

Boost :

Subject: Re: [boost] [Boost-users] [Review] ITL review starts today, February 18th
From: Joachim Faulhaber (afojgo_at_[hidden])
Date: 2010-03-04 11:52:47


2010/3/4 John Reid <j.reid_at_[hidden]>:
>
>
> John Reid wrote:
>>
>> I have some further unrelated design questions/points:
>>
>
> From what I understand of the documentation, the following code should
> return an intersection of the 2 maps performing addition on the values where
> the maps overlap.
>
> #include <boost/itl/interval_map.hpp>
>
> using namespace boost::itl;
>
> int main( int argc, char * argv[] ) {
>
>        interval_map< int, float > map_1;
>        interval_map< int, float > map_2;
>
>        map_1 & map_2;
>
>        return 0;
> }
>
>
> I get a compile error on gcc 4.4.1 complaining about "invalid operands of
> types ‘float’ and ‘const float’ to binary ‘operator &’". Is this a bug or
> did I get the wrong end of the stick?

Found the culprit :)
Although never actually called for this instantiation, interval_map<
int, float >, the intersection functor is set to inplace_et and
appears in the code that is called when

map_1 & map_2;

is applied. I have added partial instantiations for inplace_et<float>.
This is a quickfix, but fully fuctional. The more proper fix will be
done within the next days. You can update file
https://svn.boost.org/svn/boost/sandbox/itl/boost/itl/functors.hpp
from the sandbox to get the fix.

Thanks,
Joachim


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk