From 4ba60702f464eaf07c29983ce352a13d4934af37 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sat, 30 Jan 2021 13:21:59 +0100 Subject: [PATCH] :rotating_light: fix warnings --- include/nlohmann/json.hpp | 4 ++-- single_include/nlohmann/json.hpp | 4 ++-- test/src/unit-readme.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/nlohmann/json.hpp b/include/nlohmann/json.hpp index 2e41d7c30..23169faef 100644 --- a/include/nlohmann/json.hpp +++ b/include/nlohmann/json.hpp @@ -170,7 +170,7 @@ Format](http://rfc7159.net/rfc7159) @nosubgrouping */ NLOHMANN_BASIC_JSON_TPL_DECLARATION -class basic_json +class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-special-member-functions) { private: template friend struct detail::external_constructor; @@ -1444,7 +1444,7 @@ class basic_json typename U = detail::uncvref_t, detail::enable_if_t < !detail::is_basic_json::value && detail::is_compatible_type::value, int > = 0 > - basic_json(CompatibleType && val) noexcept(noexcept( + basic_json(CompatibleType && val) noexcept(noexcept( // NOLINT(bugprone-forwarding-reference-overload) JSONSerializer::to_json(std::declval(), std::forward(val)))) { diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 096272912..072927be4 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -16818,7 +16818,7 @@ Format](http://rfc7159.net/rfc7159) @nosubgrouping */ NLOHMANN_BASIC_JSON_TPL_DECLARATION -class basic_json +class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-special-member-functions) { private: template friend struct detail::external_constructor; @@ -18092,7 +18092,7 @@ class basic_json typename U = detail::uncvref_t, detail::enable_if_t < !detail::is_basic_json::value && detail::is_compatible_type::value, int > = 0 > - basic_json(CompatibleType && val) noexcept(noexcept( + basic_json(CompatibleType && val) noexcept(noexcept( // NOLINT(bugprone-forwarding-reference-overload) JSONSerializer::to_json(std::declval(), std::forward(val)))) { diff --git a/test/src/unit-readme.cpp b/test/src/unit-readme.cpp index 07d3efc1b..7db7b4e6b 100644 --- a/test/src/unit-readme.cpp +++ b/test/src/unit-readme.cpp @@ -158,7 +158,7 @@ TEST_CASE("README" * doctest::skip()) j.push_back(true); // comparison - bool x = (j == R"(["foo", 1, true])"); // true + bool x = (j == R"(["foo", 1, true])"_json); // true CHECK(x == true); // iterate the array