|
Boost Users : |
Subject: [Boost-users] [Proto] Error in FoldToList Example of Tutorial
From: Hossein Haeri (powerprogman_at_[hidden])
Date: 2010-12-24 12:13:12
Dear all,
When I compile the FoldToList example defined here in Proto tutorial:
http://boost.org/doc/libs/1_45_0/doc/html/proto/users_guide.html#boost_proto.users_guide.back_end.expression_transformation.state
I get some compiler error message in GCC 4.5.1 (MinGW32, WinXP, SP3), Boost 1.42.0. For your reference, I have included the error messages in the P.S. section of this posting. Anyone here knows what's going wrong?
TIA,--Hossein
P.S.
-------------- Build: Debug in Fold2List ---------------
Compiling: main.cpp
In file included from D:\Sources\Boost\boost_1_42_0/boost/fusion/view/ext_/segmented_iterator.hpp:23:0,
from D:\Sources\Boost\boost_1_42_0/boost/proto/fusion.hpp:28,
from D:\Sources\Boost\boost_1_42_0/boost/proto/core.hpp:21,
from D:\Sources\Boost\boost_1_42_0/boost/proto/proto.hpp:12,
from D:\My Documents\My Programmes\Tutorial\Proto\Fold2List\main.cpp:2:
D:\Sources\Boost\boost_1_42_0/boost/fusion/container/list/cons.hpp: In instantiation of 'boost::fusion::cons<boost::proto::_value, boost::proto::_state>':
D:\Sources\Boost\boost_1_42_0/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp:85:5: instantiated from 'const int boost::mpl::aux::template_arity_impl<boost::fusion::cons<boost::proto::_value, boost::proto::_state>, 1>::value'
D:\Sources\Boost\boost_1_42_0/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp:93:5: instantiated from 'const int boost::mpl::aux::template_arity<boost::fusion::cons<boost::proto::_value, boost::proto::_state> >::value'
D:\Sources\Boost\boost_1_42_0/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp:98:30: instantiated from 'boost::mpl::aux::template_arity<boost::fusion::cons<boost::proto::_value, boost::proto::_state> >'
D:\Sources\Boost\boost_1_42_0/boost/proto/traits.hpp:104:9: instantiated from 'boost::proto::is_callable<boost::fusion::cons<boost::proto::_value, boost::proto::_state> >'
D:\Sources\Boost\boost_1_42_0/boost/proto/transform/when.hpp:156:17: instantiated from 'boost::proto::when<boost::proto::op::terminal<boost::proto::wildcardns_::_>, boost::fusion::cons<boost::proto::_value, boost::proto::_state>(boost::proto::_value, boost::proto::_state)>::impl<const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<const char&>, 0l>&, const boost::fusion::nil&, int>'
D:\Sources\Boost\boost_1_42_0/boost/proto/matches.hpp:753:17: [ skipping 4 instantiation contexts ]
D:\Sources\Boost\boost_1_42_0/boost/proto/transform/call.hpp:232:93: instantiated from 'boost::proto::call<FoldToList(boost::proto::_child_c<0>, FoldToList (*)(boost::proto::_child_c<1>, boost::proto::_state))>::impl2<const boost::proto::exprns_::expr<boost::proto::tag::shift_left, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_left, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_left, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<std::basic_ostream<char>&>, 0l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<const int&>, 0l> >, 2l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<const double&>, 0l> >, 2l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<const char&>, 0l> >, 2l>&,
const boost::fusion::nil&, int, true>'
D:\Sources\Boost\boost_1_42_0/boost/proto/transform/call.hpp:276:13: instantiated from 'boost::proto::call<FoldToList(boost::proto::_child_c<0>, FoldToList (*)(boost::proto::_child_c<1>, boost::proto::_state))>::impl<const boost::proto::exprns_::expr<boost::proto::tag::shift_left, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_left, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_left, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<std::basic_ostream<char>&>, 0l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<const int&>, 0l> >, 2l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<const double&>, 0l> >, 2l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<const char&>, 0l> >, 2l>&, const
boost::fusion::nil&, int>'
D:\Sources\Boost\boost_1_42_0/boost/proto/transform/when.hpp:158:87: instantiated from 'boost::proto::when<boost::proto::op::shift_left<FoldToList, FoldToList>, FoldToList(boost::proto::_child_c<0>, FoldToList (*)(boost::proto::_child_c<1>, boost::proto::_state))>::impl<const boost::proto::exprns_::expr<boost::proto::tag::shift_left, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_left, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_left, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<std::basic_ostream<char>&>, 0l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<const int&>, 0l> >, 2l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<const double&>, 0l> >, 2l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal,
boost::proto::argsns_::term<const char&>, 0l> >, 2l>&, const boost::fusion::nil&, int>'
D:\Sources\Boost\boost_1_42_0/boost/proto/matches.hpp:753:17: instantiated from 'boost::proto::control::or_<boost::proto::when<boost::proto::op::terminal<std::basic_ostream<char>&>, boost::proto::_state>, boost::proto::when<boost::proto::op::terminal<boost::proto::wildcardns_::_>, boost::fusion::cons<boost::proto::_value, boost::proto::_state>(boost::proto::_value, boost::proto::_state)>, boost::proto::when<boost::proto::op::shift_left<FoldToList, FoldToList>, FoldToList(boost::proto::_child_c<0>, FoldToList (*)(boost::proto::_child_c<1>, boost::proto::_state))> >::impl<const boost::proto::exprns_::expr<boost::proto::tag::shift_left, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_left, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_left, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::terminal,
boost::proto::argsns_::term<std::basic_ostream<char>&>, 0l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<const int&>, 0l> >, 2l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<const double&>, 0l> >, 2l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<const char&>, 0l> >, 2l>&, const boost::fusion::nil&, int>'
D:\Sources\Boost\boost_1_42_0/boost/proto/transform/impl.hpp:85:9: instantiated from 'boost::proto::detail::apply_transform<boost::proto::control::or_<boost::proto::when<boost::proto::op::terminal<std::basic_ostream<char>&>, boost::proto::_state>, boost::proto::when<boost::proto::op::terminal<boost::proto::wildcardns_::_>, boost::fusion::cons<boost::proto::_value, boost::proto::_state>(boost::proto::_value, boost::proto::_state)>, boost::proto::when<boost::proto::op::shift_left<FoldToList, FoldToList>, FoldToList(boost::proto::_child_c<0>, FoldToList (*)(boost::proto::_child_c<1>, boost::proto::_state))> >(const boost::proto::exprns_::expr<boost::proto::tag::shift_left, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_left, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_left, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::terminal,
boost::proto::argsns_::term<std::basic_ostream<char>&>, 0l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<const int&>, 0l> >, 2l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<const double&>, 0l> >, 2l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<const char&>, 0l> >, 2l>&, const boost::fusion::nil&)>'
D:\My Documents\My Programmes\Tutorial\Proto\Fold2List\main.cpp:81:70: instantiated from here
D:\Sources\Boost\boost_1_42_0/boost/fusion/container/list/cons.hpp:61:47: error: no type named 'size' in 'struct boost::proto::_state'
Process terminated with status 1 (0 minutes, 2 seconds)
2 errors, 0 warnings
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net