From 14e33189295399e9ead4d08309b1d1b21f4040d0 Mon Sep 17 00:00:00 2001 From: Alexander Karzhenkov Date: Sun, 8 Jan 2023 18:32:30 +0500 Subject: [PATCH] Remove noexcept from optional comparisons --- include/nlohmann/optional.hpp | 1 - single_include/nlohmann/json.hpp | 1 - 2 files changed, 2 deletions(-) diff --git a/include/nlohmann/optional.hpp b/include/nlohmann/optional.hpp index d7cd210ce..9b5f09bde 100644 --- a/include/nlohmann/optional.hpp +++ b/include/nlohmann/optional.hpp @@ -179,7 +179,6 @@ template const std::optional& cmp_val(const optional& v) #define JSON_OPTIONAL_COMPARISON(OP, LHS, RHS) \ template \ 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); \ diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 67bc932aa..8045fb147 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -4771,7 +4771,6 @@ template const std::optional& cmp_val(const optional& v) #define JSON_OPTIONAL_COMPARISON(OP, LHS, RHS) \ template \ 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); \