<分区>
我有状态机,其中有大约 60 行(转换)。它不再编译,因为 MPL 类型有一些限制。
我从 Boost MSM 文档中发现这个限制可以通过以下方式解决
For the moment, the only solution to achieve more is to add headers to the MPL (luckily, this is not very complicated).
那么如何向 MPL 添加 header ?
<分区>
我有状态机,其中有大约 60 行(转换)。它不再编译,因为 MPL 类型有一些限制。
我从 Boost MSM 文档中发现这个限制可以通过以下方式解决
For the moment, the only solution to achieve more is to add headers to the MPL (luckily, this is not very complicated).
那么如何向 MPL 添加 header ?
最佳答案
在任何 #include <mpl...>
之前定义这个:
#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
关于c++ - 定义超过 50 行的 boost msm 状态机,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10089136/