|
Boost : |
Subject: Re: [boost] [Assign][GIL] Boost Assign and GIL incompatibility in gcc 4.3.2
From: Michel Morin (mimomorin_at_[hidden])
Date: 2012-03-29 17:55:30
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
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk