File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 2121// Temporary until MSVC STL supports no-exceptions mode.
2222// Currently terminate is a no-op in this mode, so we add termination behavior back
2323//
24- #if defined(_MSC_VER) && defined(_HAS_EXCEPTIONS) && !_HAS_EXCEPTIONS
24+ #if defined(_MSC_VER) && ( defined(_KERNEL_MODE) || (defined( _HAS_EXCEPTIONS) && !_HAS_EXCEPTIONS))
2525
2626#define GSL_MSVC_USE_STL_NOEXCEPTION_WORKAROUND
2727#include <intrin.h>
3131#pragma clang diagnostic push
3232#pragma clang diagnostic ignored "-Winvalid-noreturn"
3333#endif // defined(__clang__)
34- #else
34+
35+ #else // defined(_MSC_VER) && (defined(_KERNEL_MODE) || (defined(_HAS_EXCEPTIONS) && !_HAS_EXCEPTIONS))
36+
3537#include <exception>
36- #endif // !defined(_MSC_VER) || !defined(_HAS_EXCEPTIONS) || _HAS_EXCEPTIONS
38+
39+ #endif // defined(_MSC_VER) && (defined(_KERNEL_MODE) || (defined(_HAS_EXCEPTIONS) && !_HAS_EXCEPTIONS))
3740
3841//
3942// make suppress attributes parse for some compilers
You can’t perform that action at this time.
0 commit comments