diff --git a/CMakePresets.json b/CMakePresets.json index 149c07bd4..94a3861ed 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -73,14 +73,14 @@ "name": "cppcheck", "hidden": true, "cacheVariables": { - "CMAKE_CXX_CPPCHECK": "cppcheck;--inline-suppr;--std=c++20;--enable=all;--check-config;--suppress=missingIncludeSystem" + "CMAKE_CXX_CPPCHECK": "cppcheck;--inline-suppr;--std=c++20;--enable=all;--suppressions-list=${sourceDir}/cppcheck.supp" } }, { "name": "clang-tidy", "hidden": true, "cacheVariables": { - "CMAKE_CXX_CLANG_TIDY": "clang-tidy;-header-filter=${sourceDir}/src/.*;-checks=-*,bugprone-*,concurrency-*,performance-*,-macro*,-bugprone-exception-escape;-warnings-as-errors=*" + "CMAKE_CXX_CLANG_TIDY": "clang-tidy;-header-filter=${sourceDir}/src/.*;-checks=-*,bugprone-*,concurrency-*,performance-*,-macro*,-bugprone-exception-escape;-warnings-as-errors=*;-extra-arg=-std=c++20" } }, { diff --git a/cppcheck.supp b/cppcheck.supp new file mode 100644 index 000000000..0e4699980 --- /dev/null +++ b/cppcheck.supp @@ -0,0 +1,13 @@ +missingIncludeSystem + +noExplicitConstructor + +unknownMacro + +shadowFunction + +unusedVariable + +localMutex + +unmatchedSuppression diff --git a/src/rpp/rpp/observers/observer.hpp b/src/rpp/rpp/observers/observer.hpp index 3f109f885..216916744 100644 --- a/src/rpp/rpp/observers/observer.hpp +++ b/src/rpp/rpp/observers/observer.hpp @@ -250,7 +250,7 @@ namespace rpp return dynamic_observer{std::move(*this)}; } - const dynamic_observer& as_dynamic() & + dynamic_observer as_dynamic() & { return dynamic_observer{*this}; }