We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c358ae1 commit 364715dCopy full SHA for 364715d
1 file changed
test/testclass.cpp
@@ -6821,6 +6821,13 @@ class TestClass : public TestFixture {
6821
"};\n");
6822
ASSERT_EQUALS("[test.cpp:3:10]: (style, inconclusive) Technically the member function 'D::f' can be const. [functionConst]\n",
6823
errout_str());
6824
+
6825
+ checkConst("struct S {\n" // #12162
6826
+ " bool has(int i) { return m.find(i) != m.end(); }\n");
6827
+ " std::map<int, int> m;\n"
6828
+ "};\n");
6829
+ ASSERT_EQUALS("[test.cpp.2:10]: (style, inconclusive) Technically the member function 'S::has' can be const. [functionConst]\n",
6830
+ errout_str());
6831
}
6832
6833
void const98() { // #13642
0 commit comments