Skip to content

Commit

Permalink
update single include
Browse files Browse the repository at this point in the history
  • Loading branch information
NissimBendanan authored Nov 20, 2024
1 parent e58331a commit 8045369
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions single_include/nlohmann/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21637,6 +21637,10 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec

return default_value;
}
else if (JSON_HEDLEY_LIKELY(is_null()))
{
return default_value;
}

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

return std::forward<ValueType>(default_value);
}
else if (JSON_HEDLEY_LIKELY(is_null()))
{
return std::forward<ValueType>(default_value);
}

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

return default_value;
}
else if (JSON_HEDLEY_LIKELY(is_null()))
{
return default_value;
}

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

return std::forward<ValueType>(default_value);
}
else if (JSON_HEDLEY_LIKELY(is_null()))
{
return std::forward<ValueType>(default_value);
}

JSON_THROW(type_error::create(306, detail::concat("cannot use value() with ", type_name()), this));
}
Expand All @@ -21739,6 +21755,10 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
return default_value;
}
}
else if (JSON_HEDLEY_LIKELY(is_null()))
{
return default_value;
}

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

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

0 comments on commit 8045369

Please sign in to comment.