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

      1. <small id='8Y2Kj'></small><noframes id='8Y2Kj'>

        <tfoot id='8Y2Kj'></tfoot>

        GNU C++ 如何检查 -std=c++0x 何时生效?

        时间:2023-09-18
      2. <i id='wInwT'><tr id='wInwT'><dt id='wInwT'><q id='wInwT'><span id='wInwT'><b id='wInwT'><form id='wInwT'><ins id='wInwT'></ins><ul id='wInwT'></ul><sub id='wInwT'></sub></form><legend id='wInwT'></legend><bdo id='wInwT'><pre id='wInwT'><center id='wInwT'></center></pre></bdo></b><th id='wInwT'></th></span></q></dt></tr></i><div id='wInwT'><tfoot id='wInwT'></tfoot><dl id='wInwT'><fieldset id='wInwT'></fieldset></dl></div>

        <tfoot id='wInwT'></tfoot>
        <legend id='wInwT'><style id='wInwT'><dir id='wInwT'><q id='wInwT'></q></dir></style></legend>

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

              • <bdo id='wInwT'></bdo><ul id='wInwT'></ul>
                  <tbody id='wInwT'></tbody>
                  本文介绍了GNU C++ 如何检查 -std=c++0x 何时生效?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我的系统编译器 (gcc42) 与我想要的 TR1 功能配合得很好,但尝试支持系统以外的较新编译器版本,尝试访问 TR1 标头时出现 #error 要求 -std=c++0x 选项,因为了解它如何与图书馆或类似的一些集线器连接.

                  My system compiler (gcc42) works fine with the TR1 features that I want, but trying to support newer compiler versions other than the systems, trying to accessing TR1 headers an #error demanding the -std=c++0x option because of how it interfaces with library or some hub bub like that.

                  /usr/local/lib/gcc45/include/c++/bits/c++0x_warning.h:31:2: error: #error This file requires compiler and library support for the upcoming ISO C++ standard, C++0x. This support is currently experimental, and must be enabled with the -std=c++0x or -std=gnu++0x compiler options.
                  

                  必须提供一个额外的开关是没有问题的,在这个系统(FreeBSD)下支持GCC 4.4和4.5,但显然它改变了画面!

                  Having to supply an extra switch is no problem, to support GCC 4.4 and 4.5 under this system (FreeBSD), but obviously it changes the picture!

                  使用我的系统编译器(g++ 4.2 默认方言):

                  Using my system compiler (g++ 4.2 default dialect):

                  #include <tr1/foo>
                  using std::tr1::foo;
                  

                  通过 -std=c++0x 使用更新 (4.5) 版本的编译器:

                  Using newer (4.5) versions of the compiler with -std=c++0x:

                  #include <foo>
                  using std::foo;
                  

                  无论如何使用预处理器,我可以判断 g++ 是否在启用 C++0x 功能的情况下运行?

                  Is there anyway using the pre processor, that I can tell if g++ is running with C++0x features enabled?

                  我正在寻找这样的东西:

                  #ifdef __CXX0X_MODE__
                  #endif
                  

                  但我没有在手册或网上找到任何内容.

                  but I have not found anything in the manual or off the web.

                  以这种速度,我开始认为生活会更轻松,使用 Boost 作为依赖项,而不用担心在 TR4 之前出现新的语言标准......呵呵.

                  At this rate, I'm starting to think that life would just be easier, to use Boost as a dependency, and not worry about a new language standard arriving before TR4... hehe.

                  推荐答案

                  如果你用 -std=c++0x 编译,那么 __GXX_EXPERIMENTAL_CXX0X__ 将被定义.

                  If you compile with -std=c++0x, then __GXX_EXPERIMENTAL_CXX0X__ will be defined.

                  这篇关于GNU C++ 如何检查 -std=c++0x 何时生效?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:向下转型 shared_ptr<Base>到 shared_ptr<Derived& 下一篇:我可以将普通文件链接到我的可执行文件中吗?

                  相关文章

                  最新文章

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

                1. <tfoot id='BfmYE'></tfoot>

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

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