mirror of
https://github.com/nlohmann/json.git
synced 2026-09-03 15:05:01 +00:00
Include <span> where the split moved its only use
The #2546 test case guards itself with __has_include(<span>), but the include itself sat in unit-regression2.cpp's preamble and stayed behind, so the section compiled without a declaration wherever the guard passed - which nvhpc reported and libc++ builds do not, as they skip the section altogether. Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
@@ -27,6 +27,7 @@ using json = nlohmann::json;
|
|||||||
using ordered_json = nlohmann::ordered_json;
|
using ordered_json = nlohmann::ordered_json;
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#include <cstddef>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
#include <string>
|
#include <string>
|
||||||
@@ -60,6 +61,12 @@ using ordered_json = nlohmann::ordered_json;
|
|||||||
>;
|
>;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef JSON_HAS_CPP_20
|
||||||
|
#if __has_include(<span>)
|
||||||
|
#include <span>
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if JSON_HAS_RANGES == 1
|
#if JSON_HAS_RANGES == 1
|
||||||
#include <ranges>
|
#include <ranges>
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user