![](/img/trans.png)
[英]How to force `clang-format` to break constructor initializer when it doesn't exceed column limit?
[英]How can I force clang to throw errors when the code doesn't strictly conform to the standard?
我正在编写一个C ++ 11库,我希望它能够与支持C ++ 11的每个编译器一起使用。 我不想意外地编写非标准的代码(例如使用语言扩展,如VLA或块)。 如何强制clang禁用所有语言扩展,以便我只能编写符合规范的代码?
尝试以下方法之一 :
-pedantic: Warn on language extensions.
-pedantic-errors: Error on language extensions.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.