Hello,
I want to do an range selection over an composit key but I get compiler errors like:
/home/kowalke/Projects/test_multi_index/src/test_multi_index.cpp:85: instantiated from here
/opt/boost/include/boost-1_34/boost/multi_index/ordered_index.hpp:978: error: no match for call to '(boost::tuples::tuple
table;
typedef table::index< idx_tag >::type idx_type; int main( int argc, char *argv[]) { try { table tbl; tbl.insert( item( -1.1, true) ); tbl.insert( item( 1., true) ); tbl.insert( item( 0., true) ); tbl.insert( item( 1.1, false) ); tbl.insert( item( -1., true) ); tbl.insert( item( -1., false) ); idx_type & idx( tbl.get< idx_tag >() ); std::pair< idx_type::iterator, idx_type::iterator > p( idx.range( boost::make_tuple( mi::unbounded, true), boost::make_tuple( boost::lambda::_1 >= 0., true) ) ); for ( ; p.first != p.second; ++p.first) std::cout << p.first->function << " " << std::boolalpha << p.first->active << std::endl; return EXIT_SUCCESS; } catch ( std::exception const& e) { std::cerr << e.what() << std::endl; } catch ( ... ) { std::cerr << "unhandled exception" << std::endl; } return EXIT_FAILURE; }