optional: use #if instead of #ifndef, fixes #3859
This commit is contained in:
parent
a006a7a48b
commit
ff7ed18ac0
@ -48,7 +48,7 @@ inline void from_json(const BasicJsonType& j, typename std::nullptr_t& n)
|
||||
}
|
||||
|
||||
#ifdef JSON_HAS_CPP_17
|
||||
#ifndef JSON_USE_IMPLICIT_CONVERSIONS
|
||||
#if !JSON_USE_IMPLICIT_CONVERSIONS
|
||||
template<typename BasicJsonType, typename T>
|
||||
void from_json(const BasicJsonType& j, std::optional<T>& opt)
|
||||
{
|
||||
|
||||
@ -4721,7 +4721,7 @@ inline void from_json(const BasicJsonType& j, typename std::nullptr_t& n)
|
||||
}
|
||||
|
||||
#ifdef JSON_HAS_CPP_17
|
||||
#ifndef JSON_USE_IMPLICIT_CONVERSIONS
|
||||
#if !JSON_USE_IMPLICIT_CONVERSIONS
|
||||
template<typename BasicJsonType, typename T>
|
||||
void from_json(const BasicJsonType& j, std::optional<T>& opt)
|
||||
{
|
||||
|
||||
@ -1598,7 +1598,7 @@ TEST_CASE("JSON to enum mapping")
|
||||
|
||||
|
||||
#ifdef JSON_HAS_CPP_17
|
||||
#ifndef JSON_USE_IMPLICIT_CONVERSIONS
|
||||
#if !JSON_USE_IMPLICIT_CONVERSIONS
|
||||
TEST_CASE("std::optional")
|
||||
{
|
||||
SECTION("null")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user