那里有C++ 0x的任何实现吗?

Par*_*rsa 3 c++ c++11

微软即将推出的VC10除外?

jk.*_*jk. 9

是几个主要编译器中c ++ 0x支持的一个很好的细分


Mar*_*off 7

您可以运行g++ -std=c++0x大多数兼容的C++ 0x实现.

从手册:

 c++0x
   The working draft of the upcoming ISO C++0x standard. This option enables experimental features that are
   likely to be included in C++0x. The working draft is constantly changing, and any feature that is enabled
   by this flag may be removed from future versions of GCC if it is not part of the C++0x standard.

作为一个愚蠢的小例子:

$ cat a.cpp    
const int FOO_VERSION = 2;

int main() {
    static_assert(FOO_VERSION >= 3, "Your version of Foo doesn't contain the necessary bugfixes to run this program correctly.");
    return 0;
}

$ g++ -std=c++0x a.cpp
a.cpp:1:17: error: stdio: No such file or directory
a.cpp: In function ‘int main()’:
a.cpp:6: error: static assertion failed: "Your version of Foo doesn\'t contain the necessary bugfixes to run this program correctly."
Run Code Online (Sandbox Code Playgroud)

另外,正如@GMan在评论中提到的,可以在网上找到GCC的C++ 0x兼容性列表.