Skip to content

Commit b20fed5

Browse files
author
Théo Delrieu
committed
optional: use #if instead of #ifndef, fixes #3859
1 parent a006a7a commit b20fed5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/nlohmann/detail/conversions/from_json.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ inline void from_json(const BasicJsonType& j, typename std::nullptr_t& n)
4848
}
4949

5050
#ifdef JSON_HAS_CPP_17
51-
#ifndef JSON_USE_IMPLICIT_CONVERSIONS
51+
#if !JSON_USE_IMPLICIT_CONVERSIONS
5252
template<typename BasicJsonType, typename T>
5353
void from_json(const BasicJsonType& j, std::optional<T>& opt)
5454
{

tests/src/unit-conversions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1598,7 +1598,7 @@ TEST_CASE("JSON to enum mapping")
15981598

15991599

16001600
#ifdef JSON_HAS_CPP_17
1601-
#ifndef JSON_USE_IMPLICIT_CONVERSIONS
1601+
#if !JSON_USE_IMPLICIT_CONVERSIONS
16021602
TEST_CASE("std::optional")
16031603
{
16041604
SECTION("null")

0 commit comments

Comments
 (0)