File tree Expand file tree Collapse file tree 3 files changed +53
-5
lines changed Expand file tree Collapse file tree 3 files changed +53
-5
lines changed Original file line number Diff line number Diff line change 3
3
4
4
#include < type_traits>
5
5
6
- #define CTLL_CNTTP_COMPILER_CHECK (__cpp_nontype_template_parameter_class || (__cpp_nontype_template_args >= 201911L ) || ((__cpp_nontype_template_args >= 201411L ) && (__clang_major__ >= 12 ) && !__apple_build_version__))
6
+ #if defined __cpp_nontype_template_parameter_class
7
+ #define CTLL_CNTTP_COMPILER_CHECK 1
8
+ #elif defined __cpp_nontype_template_args
9
+ #if __cpp_nontype_template_args >= 201911L
10
+ #define CTLL_CNTTP_COMPILER_CHECK 1
11
+ #elif __cpp_nontype_template_args >= 201411L
12
+ #if defined __clang_major__ && __clang_major__ >= 12
13
+ #if !defined __apple_build_version__ || !__apple_build_version__
14
+ #define CTLL_CNTTP_COMPILER_CHECK 1
15
+ #endif
16
+ #endif
17
+ #endif
18
+ #endif
19
+
20
+ #ifndef CTLL_CNTTP_COMPILER_CHECK
21
+ #define CTLL_CNTTP_COMPILER_CHECK 0
22
+ #endif
7
23
8
24
#ifdef _MSC_VER
9
25
#define CTLL_FORCE_INLINE __forceinline
Original file line number Diff line number Diff line change @@ -454,7 +454,23 @@ template <size_t N> fixed_string(fixed_string<N>) -> fixed_string<N>;
454
454
455
455
#include <type_traits>
456
456
457
- #define CTLL_CNTTP_COMPILER_CHECK (__cpp_nontype_template_parameter_class || (__cpp_nontype_template_args >= 201911L) || ((__cpp_nontype_template_args >= 201411L) && (__clang_major__ >= 12) && !__apple_build_version__))
457
+ #if defined __cpp_nontype_template_parameter_class
458
+ #define CTLL_CNTTP_COMPILER_CHECK 1
459
+ #elif defined __cpp_nontype_template_args
460
+ #if __cpp_nontype_template_args >= 201911L
461
+ #define CTLL_CNTTP_COMPILER_CHECK 1
462
+ #elif __cpp_nontype_template_args >= 201411L
463
+ #if defined __clang_major__ && __clang_major__ >= 12
464
+ #if !defined __apple_build_version__ || !__apple_build_version__
465
+ #define CTLL_CNTTP_COMPILER_CHECK 1
466
+ #endif
467
+ #endif
468
+ #endif
469
+ #endif
470
+
471
+ #ifndef CTLL_CNTTP_COMPILER_CHECK
472
+ #define CTLL_CNTTP_COMPILER_CHECK 0
473
+ #endif
458
474
459
475
#ifdef _MSC_VER
460
476
#define CTLL_FORCE_INLINE __forceinline
@@ -1334,7 +1350,7 @@ struct pcre {
1334
1350
#ifndef CTRE__UTILITY__HPP
1335
1351
#define CTRE__UTILITY__HPP
1336
1352
1337
- #define CTRE_CNTTP_COMPILER_CHECK (__cpp_nontype_template_parameter_class || (__cpp_nontype_template_args >= 201911L) || ((__cpp_nontype_template_args >= 201411L) && (__clang_major__ >= 12) && !__apple_build_version__))
1353
+ #define CTRE_CNTTP_COMPILER_CHECK CTLL_CNTTP_COMPILER_CHECK
1338
1354
1339
1355
#if __GNUC__ > 9
1340
1356
#if __has_cpp_attribute(likely)
Original file line number Diff line number Diff line change @@ -451,7 +451,23 @@ template <size_t N> fixed_string(fixed_string<N>) -> fixed_string<N>;
451
451
452
452
#include < type_traits>
453
453
454
- #define CTLL_CNTTP_COMPILER_CHECK (__cpp_nontype_template_parameter_class || (__cpp_nontype_template_args >= 201911L ) || ((__cpp_nontype_template_args >= 201411L ) && (__clang_major__ >= 12 ) && !__apple_build_version__))
454
+ #if defined __cpp_nontype_template_parameter_class
455
+ #define CTLL_CNTTP_COMPILER_CHECK 1
456
+ #elif defined __cpp_nontype_template_args
457
+ #if __cpp_nontype_template_args >= 201911L
458
+ #define CTLL_CNTTP_COMPILER_CHECK 1
459
+ #elif __cpp_nontype_template_args >= 201411L
460
+ #if defined __clang_major__ && __clang_major__ >= 12
461
+ #if !defined __apple_build_version__ || !__apple_build_version__
462
+ #define CTLL_CNTTP_COMPILER_CHECK 1
463
+ #endif
464
+ #endif
465
+ #endif
466
+ #endif
467
+
468
+ #ifndef CTLL_CNTTP_COMPILER_CHECK
469
+ #define CTLL_CNTTP_COMPILER_CHECK 0
470
+ #endif
455
471
456
472
#ifdef _MSC_VER
457
473
#define CTLL_FORCE_INLINE __forceinline
@@ -1331,7 +1347,7 @@ struct pcre {
1331
1347
#ifndef CTRE__UTILITY__HPP
1332
1348
#define CTRE__UTILITY__HPP
1333
1349
1334
- #define CTRE_CNTTP_COMPILER_CHECK (__cpp_nontype_template_parameter_class || (__cpp_nontype_template_args >= 201911L ) || ((__cpp_nontype_template_args >= 201411L ) && (__clang_major__ >= 12 ) && !__apple_build_version__))
1350
+ #define CTRE_CNTTP_COMPILER_CHECK CTLL_CNTTP_COMPILER_CHECK
1335
1351
1336
1352
#if __GNUC__ > 9
1337
1353
#if __has_cpp_attribute(likely)
You can’t perform that action at this time.
0 commit comments