Skip to content

Commit

Permalink
Replace _CPPUNWIND with _HAS_EXCEPTIONS (thanks @DBJDBJ)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinmoene committed Nov 16, 2020
1 parent c0d0747 commit f4bd1d2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion include/nonstd/optional.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@
// Control presence of exception handling (try and auto discover):

#ifndef optional_CONFIG_NO_EXCEPTIONS
# if defined(__cpp_exceptions) || defined(__EXCEPTIONS) || defined(_CPPUNWIND)
# if _MSC_VER
# include <vcruntime.h> // for _HAS_EXCEPTIONS
# endif
# if _MSC_VER
# include <vcruntime.h> // for _HAS_EXCEPTIONS
# endif
# if defined(__cpp_exceptions) || defined(__EXCEPTIONS) || (_HAS_EXCEPTIONS)
# define optional_CONFIG_NO_EXCEPTIONS 0
# else
# define optional_CONFIG_NO_EXCEPTIONS 1
Expand Down

0 comments on commit f4bd1d2

Please sign in to comment.