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
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_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)
I was just finishing this email when I found a solution.
Adding only the following header
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!
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