MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / assertWithSideEffect_std_begin

Function assertWithSideEffect_std_begin

test/cfg/std.cpp:5173–5178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5171}
5172
5173void assertWithSideEffect_std_begin(const std::vector<std::string>& v) {
5174 // cppcheck-suppress checkLibraryFunction // TODO
5175 assert(std::is_sorted(std::begin(v), std::end(v), [](const std::string& a, const std::string& b) {
5176 return a.size() < b.size();
5177 })); // cppcheck-suppress checkLibraryNoReturn
5178}
5179
5180void assertWithSideEffect_std_prev_next(const std::vector<int>& v, std::vector<int>::const_iterator it) {
5181 assert(std::prev(it, 1) == v.begin());

Callers

nothing calls this directly

Calls 3

beginFunction · 0.50
endFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected