
29 Mar
2012
29 Mar
'12
9:55 p.m.
Andrew Hundt wrote:
The following source code compiles under clang 3.1, but fails under gcc 4.3.2 with boost version 1.46. It doesn't look like there are updates to either library in the boost news list since then.
#include <vector> #include <boost/assign/std/vector.hpp> // for 'operator+=()' #include <boost/gil/gil_all.hpp>
int main(int argc, char** argv){ using namespace boost::assign; std::vector<int> values; values += 1, 2, 3, 4;
typedef boost::gil::rgb8_pixel_t pt; std::vector<pt> pixValues; pixValues += pt(1,2,3),pt(2,3,4); }
To solve this problem, change Line 31 of boost/assign/std/vector.hpp from return push_back( c )( v ); to return boost::assign::push_back( c )( v ); Regards, Michel