@@ -55,6 +55,10 @@ SOFTWARE.
5555 #if !defined(ETL_USING_BUILTIN_UNDERLYING_TYPE)
5656 #define ETL_USING_BUILTIN_UNDERLYING_TYPE 1
5757 #endif
58+
59+ #if !defined(ETL_USING_BUILTIN_IS_CONSTANT_EVALUATED)
60+ #define ETL_USING_BUILTIN_IS_CONSTANT_EVALUATED 1
61+ #endif
5862#endif
5963
6064#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.
8286 #define ETL_USING_BUILTIN_UNDERLYING_TYPE __has_builtin (__underlying_type)
8387 #endif
8488
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+
8593 #if !defined(ETL_USING_BUILTIN_MEMCPY)
8694 #define ETL_USING_BUILTIN_MEMCPY __has_builtin (__builtin_memcpy)
8795 #endif
@@ -128,6 +136,10 @@ SOFTWARE.
128136 #define ETL_USING_BUILTIN_UNDERLYING_TYPE 0
129137#endif
130138
139+ #if !defined(ETL_USING_BUILTIN_IS_CONSTANT_EVALUATED)
140+ #define ETL_USING_BUILTIN_IS_CONSTANT_EVALUATED 0
141+ #endif
142+
131143#if !defined(ETL_USING_BUILTIN_MEMCPY)
132144 #define ETL_USING_BUILTIN_MEMCPY 0
133145#endif
@@ -160,6 +172,7 @@ namespace etl
160172 static ETL_CONSTANT bool using_builtin_is_trivially_destructible = (ETL_USING_BUILTIN_IS_TRIVIALLY_DESTRUCTIBLE == 1 );
161173 static ETL_CONSTANT bool using_builtin_is_trivially_copyable = (ETL_USING_BUILTIN_IS_TRIVIALLY_COPYABLE == 1 );
162174 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 );
163176 static ETL_CONSTANT bool using_builtin_memcpy = (ETL_USING_BUILTIN_MEMCPY == 1 );
164177 static ETL_CONSTANT bool using_builtin_memmove = (ETL_USING_BUILTIN_MEMMOVE == 1 );
165178 static ETL_CONSTANT bool using_builtin_memset = (ETL_USING_BUILTIN_MEMSET == 1 );
0 commit comments