From d34fde12b07211e9b02f43a6f667f13fdfd9e7d0 Mon Sep 17 00:00:00 2001 From: chrchr Date: Mon, 19 Feb 2024 14:44:26 +0100 Subject: [PATCH] Add test for #8690 --- test/cfg/std.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/cfg/std.cpp b/test/cfg/std.cpp index 4fab6bb6957..9dd3ff3ae76 100644 --- a/test/cfg/std.cpp +++ b/test/cfg/std.cpp @@ -25,6 +25,7 @@ #define __STDC_WANT_LIB_EXT1__ 1 #include #include +#include #include #include #include @@ -4936,3 +4937,9 @@ void unique_lock_const_ref(std::mutex& m) { std::unique_lock lock(m); } + +void eraseIteratorOutOfBounds_std_deque(std::deque& x) // #8690 +{ + // cppcheck-suppress eraseIteratorOutOfBounds + x.erase(x.end()); +} \ No newline at end of file