🏁 added check for _CPPUNWIND

MSVC does not define __cpp_exceptions, but seems to use _CPPUNWIND when exception support is switched on, see https://msdn.microsoft.com/en-us/library/b0084kay.aspx.
parent 65dfc97d
......@@ -82,7 +82,7 @@ SOFTWARE.
#endif
// allow to disable exceptions
#if __cpp_exceptions && not defined(JSON_NOEXCEPTION)
#if (__cpp_exceptions || defined(_CPPUNWIND)) && not defined(JSON_NOEXCEPTION)
#define JSON_THROW(exception) throw exception
#define JSON_TRY try
#define JSON_CATCH(exception) catch(exception)
......
......@@ -82,7 +82,7 @@ SOFTWARE.
#endif
// allow to disable exceptions
#if __cpp_exceptions && not defined(JSON_NOEXCEPTION)
#if (__cpp_exceptions || defined(_CPPUNWIND)) && not defined(JSON_NOEXCEPTION)
#define JSON_THROW(exception) throw exception
#define JSON_TRY try
#define JSON_CATCH(exception) catch(exception)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment