Set as default C++11 in Clang

会有一股神秘感。 提交于 2020-01-01 09:59:10

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!