diff --git a/include/nlohmann/detail/input/json_sax.hpp b/include/nlohmann/detail/input/json_sax.hpp index ae6a6cbe2..223acd60e 100644 --- a/include/nlohmann/detail/input/json_sax.hpp +++ b/include/nlohmann/detail/input/json_sax.hpp @@ -263,6 +263,7 @@ class json_sax_dom_parser const Exception& ex) { errored = true; + static_cast(ex); if (allow_exceptions) { JSON_THROW(ex); @@ -501,6 +502,7 @@ class json_sax_dom_callback_parser const Exception& ex) { errored = true; + static_cast(ex); if (allow_exceptions) { JSON_THROW(ex); diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 8743c76b6..757749a74 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -5442,6 +5442,7 @@ class json_sax_dom_parser const Exception& ex) { errored = true; + static_cast(ex); if (allow_exceptions) { JSON_THROW(ex); @@ -5680,6 +5681,7 @@ class json_sax_dom_callback_parser const Exception& ex) { errored = true; + static_cast(ex); if (allow_exceptions) { JSON_THROW(ex);