示例代码:
class Foo {
// cppcheck-suppress noExplicitConstructor
Foo(int foo) { }
}Cppcheck电话:
$ cppcheck.exe --enable=all foo.cpp
Checking foo.cpp...
[foo.cpp:3]: (style) Class 'Foo' has a constructor with 1 argument that is not explicit.如何抑制此错误?
发布于 2016-06-09 20:46:56
这条路:
class Foo {
// cppcheck-suppress noExplicitConstructor
Foo(int foo) { }
}; 它需要--inline-suppr作为命令行参数。
https://stackoverflow.com/questions/37701104
复制相似问题