Boost logo

Boost :

Subject: [boost] boost msm with more than 10 states causes long compilation error
From: Raj Sambasivan (rajinikanth_at_[hidden])
Date: 2014-07-03 17:51:16


Hi,
I get a long compilation error when i include the last line, it compiles
fine without the last line.
i tried including

  #define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS

  #define BOOST_MPL_LIMIT_VECTOR_SIZE 30 // or whatever you need

  #define BOOST_MPL_LIMIT_MAP_SIZE 30

but still have the same problem, compilation error is at the bottom.

any help?

 struct transition_table: boost::mpl::vector<

      Row<Empty, NewOrderRequest, PendingNew, handleNewOrderRequest>,

      Row<PendingNew, AckedResponse, Acked, handleAckedResponse>,

      Row<PendingNew, OrderRejectedResponse, OrderRejected,
handleOrderRejectedResponse>,

      Row<PendingNew, CancelRequest, PendingCancel, handleCancelRequest>,

      Row<PendingCancel, CanceledResponse, Canceled, handleCanceledResponse
>,

      Row<PendingCancel, CancelRejected, CancelRejected,
handleCancelRejectedResponse>,

      Row<PendingReplace, ReplacedResponse, Replaced, handleReplacedResponse
>,

      Row<PendingReplace, ReplaceRejected, ReplaceRejected,
handleReplaceRejectedResponse>,

      Row<Acked, CancelRequest, PendingCancel,
handleCancelRequest>,

     Row<Acked, FilledResponse, Filled, handleFilledResponse>

>

  {

  };

compilation error (truncated)

g++ -I/boost_1_55_0/ -c -Wall test.cpp

In file included from test.cpp:1:

In file included from ./Order.H:11:

In file included from /boost_1_55_0/boost/msm/back/state_machine.hpp:28:

In file included from /boost_1_55_0/boost/fusion/include/as_set.hpp:10:

*/boost_1_55_0/boost/fusion/container/set/convert.hpp:24:30: **error: *
*implicit*

* instantiation of undefined template
'boost::fusion::detail::as_set<11>'*

            typedef typename gen::

* ^*

*/boost_1_55_0/boost/msm/back/state_machine.hpp:1164:50: note: *in
instantiation

      of template class

      'boost::fusion::result_of::as_set<boost::mpl::s_item<Filled,

      boost::mpl::s_item<ReplaceRejected, boost::mpl::s_item<Replaced,

      boost::mpl::s_item<CancelRejected, boost::mpl::s_item<Canceled,

      boost::mpl::s_item<OrderRejected, boost::mpl::s_item<Acked,

      boost::mpl::s_item<PendingReplace, boost::mpl::s_item<PendingCancel,

      boost::mpl::s_item<PendingNew, boost::mpl::s_item<Empty,

      boost::mpl::set0<mpl_::na> > > > > > > > > > > > >' requested here

    typedef typename ::boost::fusion::result_of::as_set<state_list>::typ...

* ^*

*test.cpp:5:37: note: *in instantiation of template class

      'boost::msm::back::state_machine<<anonymous>::order_,

      boost::parameter::void_, boost::parameter::void_,
boost::parameter::void_,

      boost::parameter::void_>' requested here

std::cout << " -> " << state_names[o.current_state()[0]] << std::endl;

* ^*

*/boost_1_55_0/boost/fusion/container/set/detail/as_set.hpp:26:12: note: *

      template is declared here

    struct as_set;

* ^*

In file included from test.cpp:1:

In file included from ./Order.H:11:

In file included from /boost_1_55_0/boost/msm/back/state_machine.hpp:28:

In file included from /boost_1_55_0/boost/fusion/include/as_set.hpp:10:

*/boost_1_55_0/boost/fusion/container/set/convert.hpp:25:26: **error: *
*'apply'*

* following the 'template' keyword does not refer to a template*

                template apply<typename
result_of::begin<Sequence>::type>::type

* ^~~~~*

*test.cpp:5:38: **error: **expected ']'*

*...*


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