We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 72547b3 commit 6602ba1Copy full SHA for 6602ba1
1 file changed
test/teststl.cpp
@@ -4835,6 +4835,12 @@ class TestStl : public TestFixture {
4835
"[test.cpp:3:5]: (warning) Return value of std::remove_if() ignored. Elements remain in container. [uselessCallsRemove]\n"
4836
"[test.cpp:4:5]: (warning) Return value of std::unique() ignored. Elements remain in container. [uselessCallsRemove]\n", errout_str());
4837
4838
+ check("void f(std::string& s) {\n" // #14764
4839
+ " auto it{ std::remove(s.begin(), s.end(), 'a') };\n"
4840
+ " s.erase(it, s.end());\n"
4841
+ "}");
4842
+ ASSERT_EQUALS("", errout_str());
4843
+
4844
// #4431 - fp
4845
check("bool f() {\n"
4846
" return x ? true : (y.empty());\n"
0 commit comments