Boost logo

Boost :

Subject: Re: [boost] [fusion] for_each on gcc 4.7
From: Nathan Ridge (zeratul976_at_[hidden])
Date: 2012-06-21 15:49:53


> > On 6/20/2012 1:37 PM, Daniel Larimer wrote:
> >> I recently attempted to update to gcc 4.7 and code that compiled with 4.5.3 broke.
> >>
> >> It appears that boost::fusion expects boost::fusion::random_access_traversal_tag to implicitly cast to mpl::bool_<false>.
> >>
> >> Switching the 3rd argument from mpl::bool_<false> to an extra template arg (that was ignored), seems to fix the compilation errors.
> >>
> >> Compiled with std=c++11
> >
> > Do you have a minimal test case?
>
> #include <boost/fusion/container/vector.hpp>
> #include <boost/fusion/algorithm.hpp>
> #include <boost/fusion/include/make_vector.hpp>
>
> struct visitor {
> template<typename T>
> void operator()( T t )const{}
> };
>
> int main() {
> visitor v;
> boost::fusion::for_each( boost::fusion::make_vector(5,6.6), v );
> return 0;
> }

This compiles fine for me with --std=c++11 with GCC 4.7.0 (released
version) on MinGW.

Regards,
Nate
                                               


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk