@@ -55,6 +55,10 @@ SOFTWARE.
55
55
#if !defined(ETL_USING_BUILTIN_UNDERLYING_TYPE)
56
56
#define ETL_USING_BUILTIN_UNDERLYING_TYPE 1
57
57
#endif
58
+
59
+ #if !defined(ETL_USING_BUILTIN_IS_CONSTANT_EVALUATED)
60
+ #define ETL_USING_BUILTIN_IS_CONSTANT_EVALUATED 1
61
+ #endif
58
62
#endif
59
63
60
64
#if defined(__has_builtin) && !defined(ETL_COMPILER_MICROSOFT) // Use __has_builtin to check for existence of builtin functions? Fix VS2022 intellisense issue.
@@ -82,6 +86,10 @@ SOFTWARE.
82
86
#define ETL_USING_BUILTIN_UNDERLYING_TYPE __has_builtin (__underlying_type)
83
87
#endif
84
88
89
+ #if !defined(ETL_USING_BUILTIN_IS_CONSTANT_EVALUATED)
90
+ #define ETL_USING_BUILTIN_IS_CONSTANT_EVALUATED __has_builtin (__builtin_is_constant_evaluated)
91
+ #endif
92
+
85
93
#if !defined(ETL_USING_BUILTIN_MEMCPY)
86
94
#define ETL_USING_BUILTIN_MEMCPY __has_builtin (__builtin_memcpy)
87
95
#endif
@@ -128,6 +136,10 @@ SOFTWARE.
128
136
#define ETL_USING_BUILTIN_UNDERLYING_TYPE 0
129
137
#endif
130
138
139
+ #if !defined(ETL_USING_BUILTIN_IS_CONSTANT_EVALUATED)
140
+ #define ETL_USING_BUILTIN_IS_CONSTANT_EVALUATED 0
141
+ #endif
142
+
131
143
#if !defined(ETL_USING_BUILTIN_MEMCPY)
132
144
#define ETL_USING_BUILTIN_MEMCPY 0
133
145
#endif
@@ -160,6 +172,7 @@ namespace etl
160
172
static ETL_CONSTANT bool using_builtin_is_trivially_destructible = (ETL_USING_BUILTIN_IS_TRIVIALLY_DESTRUCTIBLE == 1 );
161
173
static ETL_CONSTANT bool using_builtin_is_trivially_copyable = (ETL_USING_BUILTIN_IS_TRIVIALLY_COPYABLE == 1 );
162
174
static ETL_CONSTANT bool using_builtin_underlying_type = (ETL_USING_BUILTIN_UNDERLYING_TYPE == 1 );
175
+ static ETL_CONSTANT bool using_builtin_is_constant_evaluated = (ETL_USING_BUILTIN_IS_CONSTANT_EVALUATED == 1 );
163
176
static ETL_CONSTANT bool using_builtin_memcpy = (ETL_USING_BUILTIN_MEMCPY == 1 );
164
177
static ETL_CONSTANT bool using_builtin_memmove = (ETL_USING_BUILTIN_MEMMOVE == 1 );
165
178
static ETL_CONSTANT bool using_builtin_memset = (ETL_USING_BUILTIN_MEMSET == 1 );
0 commit comments