Merge pull request #2825 from ldionne/ldionne-lazy

Properly constrain the basic_json conversion operator
This commit is contained in:
Niels Lohmann authored and GitHub committed 2021-07-22 12:24:56 +02:00
commit a563338039
5 files changed
+41 -19

No files matched your search

+6
View File
@@ -39,6 +39,7 @@ using nlohmann::json;
#include <list>
#include <cstdio>
#include <type_traits>
#include <utility>
#if (defined(__cplusplus) && __cplusplus >= 201703L) || (defined(_HAS_CXX17) && _HAS_CXX17 == 1) // fix for issue #464
@@ -620,4 +621,9 @@ TEST_CASE("regression tests 2")
nlohmann::to_json(o["foo"], s);
}
}
SECTION("issue #2825 - Properly constrain the basic_json conversion operator")
{
static_assert(std::is_copy_assignable<nlohmann::ordered_json>::value, "");
}
}