clang和gcc各版本默认的cpp标准
clang 16之后 c17
By default, Clang 16 or later builds C++ code according to the C++17 standard. You can use Clang in C++17 mode with the -std=c++17 option (use -std=c++1z in Clang 4 and earlier).
clang 3.4之后 c14
By default, Clang builds C++ code according to the C++14 standard. You can use Clang in C++14 mode with the -std=c++14 option (use -std=c++1y in Clang 3.4 and earlier).
GCC11之后: c17
C++17 mode is the default since GCC 11; it can be explicitly selected with the -std=c++17 command-line flag, or -std=gnu++17 to enable GNU extensions as well. Some C++17 features are available since GCC 5, but support was experimental and the ABI of C++17 features was not stable until GCC 9.
GCC 6.1至 10 : c14
GCC has full support for the of the 2014 C++ standard. This mode is the default in GCC 6.1 up until GCC 10 (inclusive); it can be explicitly selected with the -std=c++14 command-line flag, or -std=gnu++14 to enable GNU extensions as well.
GCC has full support for the 1998 C++ standard as modified by the 2003 technical corrigendum and some later defect reports, excluding the export feature which was later removed from the language. This mode is the default in GCC versions prior to 6.1; it can be explicitly selected with the -std=c++98 command-line flag, or -std=gnu++98 to enable GNU extensions as well.