diff --git a/test/cfg/std.cpp b/test/cfg/std.cpp index 4e31408b3..cfada1320 100644 --- a/test/cfg/std.cpp +++ b/test/cfg/std.cpp @@ -3165,6 +3165,9 @@ void nullPointer_wmemcmp(wchar_t *p) #include #include +// +// +// void stdfind(const std::list &ints1, const std::list &ints2) { // cppcheck-suppress mismatchingContainers @@ -3185,3 +3188,22 @@ void stdfind(const std::list &ints1, const std::list &ints2) // cppcheck-suppress mismatchingContainers if (std::find_if_not(ints1.begin(), ints1.end(), [](int i){return i!=0;}) == ints2.end()) {} } + +// +// +// +void stdallof(const std::list &ints1, const std::list &ints2) { + bool pred(int); + + // cppcheck-suppress mismatchingContainers + // cppcheck-suppress ignoredReturnValue + std::all_of(ints1.begin(), ints2.end(), pred); + + // cppcheck-suppress mismatchingContainers + // cppcheck-suppress ignoredReturnValue + std::any_of(ints1.begin(), ints2.end(), pred); + + // cppcheck-suppress mismatchingContainers + // cppcheck-suppress ignoredReturnValue + std::none_of(ints1.begin(), ints2.end(), pred); +}