mirror of
https://github.com/microsoft/GSL.git
synced 2025-03-19 20:17:51 -04:00
update kernel mode detection macro
This commit is contained in:
parent
ce4d689f4f
commit
06adf557e9
@ -21,7 +21,7 @@
|
|||||||
// Temporary until MSVC STL supports no-exceptions mode.
|
// Temporary until MSVC STL supports no-exceptions mode.
|
||||||
// Currently terminate is a no-op in this mode, so we add termination behavior back
|
// Currently terminate is a no-op in this mode, so we add termination behavior back
|
||||||
//
|
//
|
||||||
#if defined(_MSC_VER) && defined(_HAS_EXCEPTIONS) && !_HAS_EXCEPTIONS
|
#if defined(_MSC_VER) && (defined(_KERNEL_MODE) || (defined(_HAS_EXCEPTIONS) && !_HAS_EXCEPTIONS))
|
||||||
|
|
||||||
#define GSL_MSVC_USE_STL_NOEXCEPTION_WORKAROUND
|
#define GSL_MSVC_USE_STL_NOEXCEPTION_WORKAROUND
|
||||||
#include <intrin.h>
|
#include <intrin.h>
|
||||||
@ -31,9 +31,12 @@
|
|||||||
#pragma clang diagnostic push
|
#pragma clang diagnostic push
|
||||||
#pragma clang diagnostic ignored "-Winvalid-noreturn"
|
#pragma clang diagnostic ignored "-Winvalid-noreturn"
|
||||||
#endif // defined(__clang__)
|
#endif // defined(__clang__)
|
||||||
#else
|
|
||||||
|
#else // defined(_MSC_VER) && (defined(_KERNEL_MODE) || (defined(_HAS_EXCEPTIONS) && !_HAS_EXCEPTIONS))
|
||||||
|
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#endif // !defined(_MSC_VER) || !defined(_HAS_EXCEPTIONS) || _HAS_EXCEPTIONS
|
|
||||||
|
#endif // defined(_MSC_VER) && (defined(_KERNEL_MODE) || (defined(_HAS_EXCEPTIONS) && !_HAS_EXCEPTIONS))
|
||||||
|
|
||||||
//
|
//
|
||||||
// make suppress attributes parse for some compilers
|
// make suppress attributes parse for some compilers
|
||||||
|
Loading…
x
Reference in New Issue
Block a user