Skip to content

Commit 8045369

Browse files
update single include
1 parent e58331a commit 8045369

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

single_include/nlohmann/json.hpp

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21637,6 +21637,10 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
2163721637

2163821638
return default_value;
2163921639
}
21640+
else if (JSON_HEDLEY_LIKELY(is_null()))
21641+
{
21642+
return default_value;
21643+
}
2164021644

2164121645
JSON_THROW(type_error::create(306, detail::concat("cannot use value() with ", type_name()), this));
2164221646
}
@@ -21662,6 +21666,10 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
2166221666

2166321667
return std::forward<ValueType>(default_value);
2166421668
}
21669+
else if (JSON_HEDLEY_LIKELY(is_null()))
21670+
{
21671+
return std::forward<ValueType>(default_value);
21672+
}
2166521673

2166621674
JSON_THROW(type_error::create(306, detail::concat("cannot use value() with ", type_name()), this));
2166721675
}
@@ -21688,6 +21696,10 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
2168821696

2168921697
return default_value;
2169021698
}
21699+
else if (JSON_HEDLEY_LIKELY(is_null()))
21700+
{
21701+
return default_value;
21702+
}
2169121703

2169221704
JSON_THROW(type_error::create(306, detail::concat("cannot use value() with ", type_name()), this));
2169321705
}
@@ -21715,6 +21727,10 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
2171521727

2171621728
return std::forward<ValueType>(default_value);
2171721729
}
21730+
else if (JSON_HEDLEY_LIKELY(is_null()))
21731+
{
21732+
return std::forward<ValueType>(default_value);
21733+
}
2171821734

2171921735
JSON_THROW(type_error::create(306, detail::concat("cannot use value() with ", type_name()), this));
2172021736
}
@@ -21739,6 +21755,10 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
2173921755
return default_value;
2174021756
}
2174121757
}
21758+
else if (JSON_HEDLEY_LIKELY(is_null()))
21759+
{
21760+
return default_value;
21761+
}
2174221762

2174321763
JSON_THROW(type_error::create(306, detail::concat("cannot use value() with ", type_name()), this));
2174421764
}
@@ -21764,6 +21784,10 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
2176421784
return std::forward<ValueType>(default_value);
2176521785
}
2176621786
}
21787+
else if (JSON_HEDLEY_LIKELY(is_null()))
21788+
{
21789+
return std::forward<ValueType>(default_value);
21790+
}
2176721791

2176821792
JSON_THROW(type_error::create(306, detail::concat("cannot use value() with ", type_name()), this));
2176921793
}

0 commit comments

Comments
 (0)