mirror of
https://github.com/nlohmann/json.git
synced 2026-03-06 09:16:25 +00:00
Provide fallback for missing char8_t support (#4736)
This commit is contained in:
@@ -1134,9 +1134,10 @@ TEST_CASE("deserialization")
|
||||
}
|
||||
}
|
||||
|
||||
// select the types to test - char8_t is only available in C++20
|
||||
// select the types to test - char8_t is only available since C++20 if and only
|
||||
// if __cpp_char8_t is defined.
|
||||
#define TYPE_LIST(...) __VA_ARGS__
|
||||
#ifdef JSON_HAS_CPP_20
|
||||
#if defined(__cpp_char8_t) && (__cpp_char8_t >= 201811L)
|
||||
#define ASCII_TYPES TYPE_LIST(char, wchar_t, char16_t, char32_t, char8_t)
|
||||
#else
|
||||
#define ASCII_TYPES TYPE_LIST(char, wchar_t, char16_t, char32_t)
|
||||
|
||||
Reference in New Issue
Block a user