|
Boost : |
Subject: [boost] [fusion] for_each on gcc 4.7
From: Daniel Larimer (dlarimer_at_[hidden])
Date: 2012-06-20 01:37:13
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
/usr/local/include/boost/fusion/algorithm/iteration/for_each.hpp:32:9: error: no matching function for call to 'for_each(boost::fusion::vector2<double, double>&, const mace::rpc::detail::unpack_sequence<mace::rpc::function_filter<mace::rpc::connection<mace::rpc::json::io> > >&, boost::fusion::detail::fusion_category_of<boost::fusion::vector2<double, double> >::type)'
/usr/local/include/boost/fusion/algorithm/iteration/for_each.hpp:32:9: note: candidate is:
In file included from /usr/local/include/boost/fusion/algorithm/iteration/for_each.hpp:11:0,
from /usr/local/include/boost/fusion/algorithm/iteration.hpp:12,
from /usr/local/include/boost/fusion/algorithm.hpp:10,
from /Users/dlarimer/projects/mace/libs/rpc/include/mace/rpc/json/io.hpp:13,
from /Users/dlarimer/projects/mace/libs/rpc/include/mace/rpc/json/tcp/server.hpp:4,
from /Users/dlarimer/projects/mace/libs/rpc/examples/json_tcps.cpp:1:
/usr/local/include/boost/fusion/algorithm/iteration/detail/for_each.hpp:130:5: note: template<class Sequence, class F> void boost::fusion::detail::for_each(Sequence&, const F&, mpl_::false_)
/usr/local/include/boost/fusion/algorithm/iteration/detail/for_each.hpp:130:5: note: template argument deduction/substitution failed:
In file included from /usr/local/include/boost/fusion/algorithm/iteration.hpp:12:0,
from /usr/local/include/boost/fusion/algorithm.hpp:10,
from /Users/dlarimer/projects/mace/libs/rpc/include/mace/rpc/json/io.hpp:13,
from /Users/dlarimer/projects/mace/libs/rpc/include/mace/rpc/json/tcp/server.hpp:4,
from /Users/dlarimer/projects/mace/libs/rpc/examples/json_tcps.cpp:1:
/usr/local/include/boost/fusion/algorithm/iteration/for_each.hpp:32:9: note: cannot convert 'boost::fusion::detail::fusion_category_of<boost::fusion::vector2<double, double> >::type()' (type 'boost::fusion::detail::fusion_category_of<boost::fusion::vector2<double, double> >::type {aka boost::fusion::random_access_traversal_tag}') to type 'mpl_::false_ {aka mpl_::bool_<false>}'
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk