问题
The LLVM C++ compiler has full support for C++11 standard. Is there a way to set C++11 as the default standard without adding -std=c++11
compiler flag every time? I tried setting CCXFLAGS
environment variable to -std=c++11
, but with no luck.
回答1:
Use clang 6.0.0 or higher. The default C++ dialect is now C++14.
http://releases.llvm.org/6.0.1/tools/clang/docs/ReleaseNotes.html#c-language-changes-in-clang
来源:https://stackoverflow.com/questions/21581838/set-as-default-c11-in-clang