新标准的特性对 C++11 中的 boost 库实现有重大影响吗?
特别感兴趣 boost::variant
(BOOST_VARIANT_LIMIT_TYPES) 和 boost::spirit
库中的部分 variadic 模板.
有没有关于这个的好文章?
最佳答案
(我正在写我的第三条评论,它将专门讨论 Spirit 的主题。无论如何我决定将我的评论融入一个答案)
Boost Spirit 将专门使用 C++11 功能(即放弃 C++03 支持),以便它可以充分利用改进的 TMP 功能和缩短的编译时间 - 编译时间是使用的一大缺点 spirit V2.
Spirit X3(实验性 V3 分支)已经在积极开发中:
And in yet other news: Spirit V3 will be C++11 only and move-enabled:
Feb 11, 2013; 12:02pm, Joel de Guzman wrote:
No, X3 will be C++11 only. Pure. No workarounds.
Keep in mind though that X3 is, by its nature, X-perimental. A lot of things can happen from X3 to final. I am not closing the door on C++03 support, although I am heavily inclined to move on without 03. V2 will not be going away anytime soon anyway.
此外,表达式模板将是 auto
安全的,当您希望将“原始”解析器表达式绑定(bind)到局部变量时,不再需要 BOOST_SPIRIT_AUTO 宏。
我找到了 Spirit X3 存储库的链接:
- https://github.com/djowel/spirit_x3 (github)
请注意 http://boost-spirit.com/home/2013/02/23/spirit-x3-on-github/ 的开发状态
关于c++ - 新标准的特性对 C++11 中的 boost 库实现有重大影响吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16098898/