mirror of
https://github.com/nlohmann/json.git
synced 2026-02-23 11:56:24 +00:00
Use DOCTEST_* compiler macros and suppress pragmas warning (#3550)
Use DOCTEST_* macros in place of predefined compiler macros for compiler detection and version checks. The suppression of warning -Wrange-loop-construct in unit-items.cpp causes GCC<11 to warn about pragmas. Suppressed by adding a version check.
This commit is contained in:
committed by
GitHub
parent
87cda1d664
commit
39e27684ea
@@ -34,7 +34,9 @@ using nlohmann::json;
|
||||
|
||||
// This test suite uses range for loops where values are copied. This is inefficient in usual code, but required to achieve 100% coverage.
|
||||
DOCTEST_GCC_SUPPRESS_WARNING_PUSH
|
||||
DOCTEST_GCC_SUPPRESS_WARNING("-Wrange-loop-construct")
|
||||
#if DOCTEST_GCC >= DOCTEST_COMPILER(11, 0, 0)
|
||||
DOCTEST_GCC_SUPPRESS_WARNING("-Wrange-loop-construct")
|
||||
#endif
|
||||
DOCTEST_CLANG_SUPPRESS_WARNING_PUSH
|
||||
DOCTEST_CLANG_SUPPRESS_WARNING("-Wrange-loop-construct")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user