Skip to content

Commit

Permalink
Remove noexcept from optional comparisons
Browse files Browse the repository at this point in the history
  • Loading branch information
karzhenkov committed Jan 8, 2023
1 parent d3f72b1 commit 14e3318
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
1 change: 0 additions & 1 deletion include/nlohmann/optional.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ template <typename T> const std::optional<T>& cmp_val(const optional<T>& v)
#define JSON_OPTIONAL_COMPARISON(OP, LHS, RHS) \
template <typename A, typename B> \
auto operator OP (const LHS& lhs, const RHS& rhs) \
noexcept(noexcept(JSON_OPTIONAL_COMPARISON_EXPR(OP))) \
-> decltype(JSON_OPTIONAL_COMPARISON_EXPR(OP)) \
{ \
return JSON_OPTIONAL_COMPARISON_EXPR(OP); \
Expand Down
1 change: 0 additions & 1 deletion single_include/nlohmann/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4771,7 +4771,6 @@ template <typename T> const std::optional<T>& cmp_val(const optional<T>& v)
#define JSON_OPTIONAL_COMPARISON(OP, LHS, RHS) \
template <typename A, typename B> \
auto operator OP (const LHS& lhs, const RHS& rhs) \
noexcept(noexcept(JSON_OPTIONAL_COMPARISON_EXPR(OP))) \
-> decltype(JSON_OPTIONAL_COMPARISON_EXPR(OP)) \
{ \
return JSON_OPTIONAL_COMPARISON_EXPR(OP); \
Expand Down

0 comments on commit 14e3318

Please sign in to comment.