|
Boost Users : |
Subject: [Boost-users] [MSM][MPL] Can't compile FSM with > 20 transitions (solved)
From: Carlos Santos (carlos.santos_at_[hidden])
Date: 2016-02-05 12:29:48
Hi there,
I am using boost v1.59 and I am having trouble in compiling a MSM state
machine with more than 20 transitions.
I followed the Q&A and added the following lines BEFORE any boost include:
#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 // or whatever you need
but now instead of getting the previous error:
error: wrong number of template arguments (21, should be 20)
I get this one:
/usr/local/include/boost/multi_index/tag.hpp:75:67: error: wrong number
of template arguments (30, should be 20)
mpl::vector<BOOST_PP_ENUM_PARAMS(BOOST_MULTI_INDEX_TAG_SIZE,T)>,
I was just finishing this email when I found a solution.
Adding only the following header
#include "boost/mpl/vector/vector30.hpp"
and explicitly declaring the transition table as a numbered mpl::vector
(yep you have to count the rows...)
struct transition_table : mpl::vector21< ... >
solves the problem.
Can you suggest me a better solution for this? Thanks!
*Carlos Santos
*
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