Skip to content

Commit ce4d689

Browse files
author
Jordan Maples
committed
shuffle around code to bring includes to top.
1 parent b305240 commit ce4d689

File tree

1 file changed

+14
-17
lines changed

1 file changed

+14
-17
lines changed

include/gsl/gsl_assert

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,6 @@
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
@@ -45,13 +31,24 @@
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

0 commit comments

Comments
 (0)