各编译器对c++20的支持情况

  • Clang has partial C++20 support that can be enabled with the option -std=c++20 (version 10 and later) or -std=c++2a (version 9 and earlier).[129]
  • EDG eccp started implementing C++20 features in version 5.0 and as of version 6.1 supports most C++20 core language features.[130]
  • GCC added partial, experimental C++20 support in 2017[131] in version 8 through the option -std=c++2a. Like Clang, GCC replaced this option with -std=c++20 in version 10. It also has an option to enable GNU extensions in addition to the experimental C++20 support, -std=gnu++20.[132]
  • Microsoft Visual Studio supports some C++20 features through its std:c++latest option. An option /std:c++20 to enable C++20 mode is expected as soon as the compiler is C++20 feature complete.[133]
posted @ 2021-07-08 21:56  元几科技  阅读(4781)  评论(0编辑  收藏  举报