File tree Expand file tree Collapse file tree 1 file changed +14
-17
lines changed
Expand file tree Collapse file tree 1 file changed +14
-17
lines changed Original file line number Diff line number Diff line change 1717#ifndef GSL_CONTRACTS_H
1818#define GSL_CONTRACTS_H
1919
20- //
21- // make suppress attributes parse for some compilers
22- // Hopefully temporary until suppression standardization occurs
23- //
24- #if defined(__clang__)
25- #define GSL_SUPPRESS(x) [[gsl::suppress("x")]]
26- #else
27- #if defined(_MSC_VER)
28- #define GSL_SUPPRESS(x) [[gsl::suppress(x)]]
29- #else
30- #define GSL_SUPPRESS(x)
31- #endif // _MSC_VER
32- #endif // __clang__
33-
3420//
3521// Temporary until MSVC STL supports no-exceptions mode.
3622// Currently terminate is a no-op in this mode, so we add termination behavior back
4531#pragma clang diagnostic push
4632#pragma clang diagnostic ignored "-Winvalid-noreturn"
4733#endif // defined(__clang__)
48-
4934#else
50-
5135#include <exception>
52-
5336#endif // !defined(_MSC_VER) || !defined(_HAS_EXCEPTIONS) || _HAS_EXCEPTIONS
5437
38+ //
39+ // make suppress attributes parse for some compilers
40+ // Hopefully temporary until suppression standardization occurs
41+ //
42+ #if defined(__clang__)
43+ #define GSL_SUPPRESS(x) [[gsl::suppress("x")]]
44+ #else
45+ #if defined(_MSC_VER)
46+ #define GSL_SUPPRESS(x) [[gsl::suppress(x)]]
47+ #else
48+ #define GSL_SUPPRESS(x)
49+ #endif // _MSC_VER
50+ #endif // __clang__
51+
5552#define GSL_STRINGIFY_DETAIL(x) #x
5653#define GSL_STRINGIFY(x) GSL_STRINGIFY_DETAIL(x)
5754
You can’t perform that action at this time.
0 commit comments