c++ - 定义超过 50 行的 boost msm 状态机

标签 c++ boost

<分区>

我有状态机,其中有大约 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/

相关文章:

c++ - 模板类限制

c++ - 如何在 C++ 容器中向左移动元素(以实现删除)?

c++ - C++ 中的 "Decrypt"MD5

c++ - BOOST 程序_选项 : parsing multiple argument list

c++ - 如何进行逐元素比较并根据结果做不同的操作

c++ - 我的构造函数指定了至少一个构造值,但它可以被默认构造

c++ - 在 boost::spirit::lex 中,如何添加具有语义操作和 token ID 的 token ?

c++ - 使用 Boost Asio 建立 SSL 连接

c++ - 如果不是json,但类似,如何使用boost解析?

c++ - multi_array_view 赋值没有深拷贝?