• <small id='pu1z1'></small><noframes id='pu1z1'>

    <tfoot id='pu1z1'></tfoot>

    <i id='pu1z1'><tr id='pu1z1'><dt id='pu1z1'><q id='pu1z1'><span id='pu1z1'><b id='pu1z1'><form id='pu1z1'><ins id='pu1z1'></ins><ul id='pu1z1'></ul><sub id='pu1z1'></sub></form><legend id='pu1z1'></legend><bdo id='pu1z1'><pre id='pu1z1'><center id='pu1z1'></center></pre></bdo></b><th id='pu1z1'></th></span></q></dt></tr></i><div id='pu1z1'><tfoot id='pu1z1'></tfoot><dl id='pu1z1'><fieldset id='pu1z1'></fieldset></dl></div>
  • <legend id='pu1z1'><style id='pu1z1'><dir id='pu1z1'><q id='pu1z1'></q></dir></style></legend>

          <bdo id='pu1z1'></bdo><ul id='pu1z1'></ul>

        Boost.Spirit mini_xml2.cpp 示例无法被 C++11, Boost 1.55 编译

        Boost.Spirit mini_xml2.cpp example could not be compiled by C++11, Boost 1.55(Boost.Spirit mini_xml2.cpp 示例无法被 C++11, Boost 1.55 编译)
      1. <small id='Xbcri'></small><noframes id='Xbcri'>

        <tfoot id='Xbcri'></tfoot>

            <legend id='Xbcri'><style id='Xbcri'><dir id='Xbcri'><q id='Xbcri'></q></dir></style></legend>
            • <bdo id='Xbcri'></bdo><ul id='Xbcri'></ul>

                  <tbody id='Xbcri'></tbody>
                  <i id='Xbcri'><tr id='Xbcri'><dt id='Xbcri'><q id='Xbcri'><span id='Xbcri'><b id='Xbcri'><form id='Xbcri'><ins id='Xbcri'></ins><ul id='Xbcri'></ul><sub id='Xbcri'></sub></form><legend id='Xbcri'></legend><bdo id='Xbcri'><pre id='Xbcri'><center id='Xbcri'></center></pre></bdo></b><th id='Xbcri'></th></span></q></dt></tr></i><div id='Xbcri'><tfoot id='Xbcri'></tfoot><dl id='Xbcri'><fieldset id='Xbcri'></fieldset></dl></div>

                  本文介绍了Boost.Spirit mini_xml2.cpp 示例无法被 C++11, Boost 1.55 编译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  c++0x 编译器无法编译 boost.spirit 示例 mini_xml2.cpp(并且没有来自非 c++0x 编译器的错误)

                  c++0x compiler fails to compile boost.spirit example mini_xml2.cpp (and no errors from not c++0x compiler)

                  $> c++ -std=c++0x mini_xml2.cpp (errors)
                  $> c++ mini_xml2.cpp (no errors)
                  

                  错误日志放在这里.我怀疑该问题与非终结符属性有关(第 159-163 行),但我可能是错的.

                  The error log is placed here. I suspect that problem is related to nonterminal attributes (lines 159-163), but I could be wrong.

                  • c++ 版本(Ubuntu/Linaro 4.8.1-10ubuntu9)4.8.1
                  • Boost 1.55 版

                  我在 boost 跟踪器上创建了问题,但没有回答.

                  I've created issue at the boost tracker, but have no answer.

                  有人有同样的错误吗?

                  已解决:我在此处找到了解决方案.

                  Solved: I found a solution here.

                  // Add this macro
                  #define BOOST_SPIRIT_USE_PHOENIX_V3
                  

                  推荐答案

                  如上所述,在现代编译器上,您实际上需要使用 Phoenix V3,因为 Phoenix V2 依赖于结果协议,在较新版本的 boost 库中,它不再总是包含在内.

                  As indicated, on modern compilers you will actually need to use Phoenix V3, as Phoenix V2 relies on the old result-of protocol, which in newer versions of boost libraries just isn't always included anymore.

                  此外,在某些编译器(AFAIK 至少是 clang)上,BOOST_RESULT_OF_USE_DECLTYPE 方法默认启用,这可能导致支持库忽略(成本更高的)TR1 结果协议.

                  Additionally on some compilers (AFAIK at least clang) the BOOST_RESULT_OF_USE_DECLTYPE approach is enabled by default, which may cause the supporting libraries to omit the (more costly) TR1 result-of protocol.

                  好消息是,在我们在用户列表作为反复出现的绊脚石,官方决定在这里:

                  The good news is, after we signaled this on the user list as a recurring stumbling block, the official decision is here:

                  告别凤凰-2 2013 年 12 月 14 日;凌晨 3:38(乔尔·德·古兹曼)
                  (也博文)

                  Boost C++... 十多年后,我终于将 Phoenix-2 从Boost Spirit 代码库.我很难过.这就像告别一个好朋友.向前到 Phoenix-3.

                  Boost C++... After more than a decade, I finally retired Phoenix-2 from the Boost Spirit code base. I feel sad. It's like farewell to a good friend. Onwards to Phoenix-3.

                  那只是 7 天前:)

                  所以在(不久的)将来这个问题将得到解决.

                  So in the (near) future this problem will have been resolved.

                  这篇关于Boost.Spirit mini_xml2.cpp 示例无法被 C++11, Boost 1.55 编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How to limit the number of running instances in C++(C++中如何限制运行实例的数量)
                  Using boost::asio::async_read with stdin?(将 boost::asio::async_read 与 stdin 一起使用?)
                  How to find out what dependencies (i.e other Boost libraries) a particular Boost library requires?(如何找出特定 Boost 库需要哪些依赖项(即其他 Boost 库)?)
                  What#39;s the purpose of a leading quot;::quot; in a C++ method call(引导“::的目的是什么?在 C++ 方法调用中)
                  Boost Spirit x3: parse into structs(Boost Spirit x3:解析为结构体)
                  How boost auto-linking makes choice?(boost自动链接如何做出选择?)

                  <small id='MUgRz'></small><noframes id='MUgRz'>

                  <legend id='MUgRz'><style id='MUgRz'><dir id='MUgRz'><q id='MUgRz'></q></dir></style></legend>
                  • <i id='MUgRz'><tr id='MUgRz'><dt id='MUgRz'><q id='MUgRz'><span id='MUgRz'><b id='MUgRz'><form id='MUgRz'><ins id='MUgRz'></ins><ul id='MUgRz'></ul><sub id='MUgRz'></sub></form><legend id='MUgRz'></legend><bdo id='MUgRz'><pre id='MUgRz'><center id='MUgRz'></center></pre></bdo></b><th id='MUgRz'></th></span></q></dt></tr></i><div id='MUgRz'><tfoot id='MUgRz'></tfoot><dl id='MUgRz'><fieldset id='MUgRz'></fieldset></dl></div>
                      <tbody id='MUgRz'></tbody>
                      • <bdo id='MUgRz'></bdo><ul id='MUgRz'></ul>
                        <tfoot id='MUgRz'></tfoot>