
12 Jun
2011
12 Jun
'11
11:34 a.m.
This simple example doesn't compile with GCC 4.4 + Boost 1.46.1: #include <boost/assign/list_of.hpp> #include <boost/foreach.hpp> #include <iostream> int main() { BOOST_FOREACH( int i, boost::assign::list_of(3)(1)(4)(1)(5) ) std::cout << i << ' '; } error: operands to ?: have different types 'const boost::foreach_detail_::rvalue_probe<boost::assign_detail::generic_list<int> >' and 'boost::assign_detail::generic_list<int>' I believe both Foreach and Assign library are to ease sequence creation/iteration on the fly, so they should work together smoothly. Thanks, Maxim