From de806a1dd5fa3addf045c9ef88f63091fea3080f Mon Sep 17 00:00:00 2001 From: chrchr-github <78114321+chrchr-github@users.noreply.github.com> Date: Mon, 16 Sep 2024 19:10:21 +0200 Subject: [PATCH] Add support for std::complex (refs #11313) (#6807) --- cfg/std.cfg | 1 + test/cfg/std.cpp | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/cfg/std.cfg b/cfg/std.cfg index 2ee14731d37..c013277a670 100644 --- a/cfg/std.cfg +++ b/cfg/std.cfg @@ -8978,6 +8978,7 @@ initializer list (7) string& replace (const_iterator i1, const_iterator i2, init std::unique_lock std::shared_lock std::pair + std::complex std::exception std::logic_error std::domain_error diff --git a/test/cfg/std.cpp b/test/cfg/std.cpp index 283e3b9a62e..f208792f077 100644 --- a/test/cfg/std.cpp +++ b/test/cfg/std.cpp @@ -5153,6 +5153,14 @@ void unusedvar_stringstream(const char* p) std::stringstream sstr(p); } +void unusedvar_stdcomplex() +{ + // cppcheck-suppress unusedVariable + std::complex z1; + // cppcheck-suppress unreadVariable + std::complex z2(0.0, 0.0); +} + int passedByValue_std_array1(std::array a) { return a[0] + a[1];