最終更新:2025-12-24 (水) 12:53:03 (26d)  

g++ --std
Top / g++ --std

Ubuntu 20.04GCC 9.4?

  • g++ --help=c++ | grep std=
    c++98?
    c++03?Conform to the ISO 1998 C++ standard revised by the 2003 technical corrigendum. Same as -std=c++98.
    c++0x?Deprecated in favor of -std=c++11. Same as -std=c++11.
    c++11?Conform to the ISO 2011 C++ standard.
    c++14?Conform to the ISO 2014 C++ standard.
    c++17?Conform to the ISO 2017 C++ standard.
    c++1y?Deprecated in favor of -std=c++14. Same as -std=c++14.
    c++1z?Deprecated in favor of -std=c++17. Same as -std=c++17.
    c++2a?Conform to the ISO 2020(?) C++ draft standard (experimental and incomplete support).
    c++98?Conform to the ISO 1998 C++ standard revised by the 2003 technical corrigendum.
    gnu++03?Conform to the ISO 1998 C++ standard revised by the 2003 technical corrigendum with GNU extensions. Same as -std=gnu++98.
    gnu++0x?Deprecated in favor of -std=gnu++11. Same as -std=gnu++11.
    gnu++11?Conform to the ISO 2011 C++ standard with GNU extensions.
    gnu++14?Conform to the ISO 2014 C++ standard with GNU extensions.
    gnu++17Conform to the ISO 2017 C++ standard with GNU extensions.
    gnu++1y?Deprecated in favor of -std=gnu++14. Same as -std=gnu++14.
    gnu++1z?Deprecated in favor of -std=gnu++17. Same as -std=gnu++17.
    gnu++2a?Conform to the ISO 2020(?) C++ draft standard with GNU extensions (experimental and incomplete support).
    gnu++98?Conform to the ISO 1998 C++ standard revised by the 2003 technical corrigendum with GNU extensions.