🐛 fix GCC16 issue

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
Niels Lohmann
2026-06-29 09:13:32 +02:00
parent 1d77ffe695
commit 794ab7d03b
3 changed files with 30 additions and 24 deletions
+15
View File
@@ -86,6 +86,21 @@
*/
NLOHMANN_JSON_NAMESPACE_BEGIN
namespace detail
{
// Trait to detect std::optional<T> specializations. It is defined here rather
// than in type_traits.hpp so that adding the <optional> include does not change
// the include order of the C++20 module's global module fragment (the include
// is already pulled in by the conversion headers above); see src/modules/json.cppm.
template<typename>
struct is_std_optional : std::false_type {};
#ifdef JSON_HAS_CPP_17
template<typename T>
struct is_std_optional<std::optional<T>> : std::true_type {};
#endif
} // namespace detail
/*!
@brief a class to store JSON values