diff --git a/include/nlohmann/detail/macro_scope.hpp b/include/nlohmann/detail/macro_scope.hpp index e9eba73a4..8bf0633fb 100644 --- a/include/nlohmann/detail/macro_scope.hpp +++ b/include/nlohmann/detail/macro_scope.hpp @@ -26,6 +26,7 @@ template #if defined(__cpp_exceptions) || defined(__EXCEPTIONS) || defined(_CPPUNWIND) || defined(EXCEPTIONS) throw std::forward(exception); #else + (void)exception; std::abort(); #endif } diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index f904da159..94768c22d 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -2392,6 +2392,7 @@ template #if defined(__cpp_exceptions) || defined(__EXCEPTIONS) || defined(_CPPUNWIND) || defined(EXCEPTIONS) throw std::forward(exception); #else + (void)exception; std::abort(); #endif }