メモを供養
GCC
バージョン6からC++14(+GNU拡張)がデフォルトになっており、それ以前はC++98(+GNU拡張)だった。
Caveats
- The default mode for C++ is now -std=gnu++14 instead of -std=gnu++98.
Clang
バージョン6からC++14(+GNU拡張)がデフォルトになっており、それ以前はC++98(+GNU拡張)だった。
C++ Language Changes in Clang
- Clang’s default C++ dialect is now gnu++14 instead of gnu++98. This means Clang will by default accept code using features from C++14 and conforming GNU extensions. Projects incompatible with C++14 can add -std=gnu++98 to their build settings to restore the previous behaviour.
まとめ
どちらもバージョン6から-std=gnu++14
がデフォルト、それ以前は-std=gnu++98
がデフォルト。
覚えやすい。