
4 Mar
2010
4 Mar
'10
3:03 p.m.
John Reid wrote:
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?
I see now that this works for ints: there is no compile error when the type is interval_map< int, int >.