Add pre C++20 Support for ETL_CONSTINIT using Compiler Extensions (#1335)

Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
This commit is contained in:
Christoph Rüthing 2026-03-12 20:47:39 +01:00 committed by GitHub
parent 8a61985ac8
commit 237d83c107
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -461,7 +461,13 @@ SOFTWARE.
#define ETL_UNLIKELY
#define ETL_CONSTEXPR20
#define ETL_CONSTEVAL
#define ETL_CONSTINIT
#if ETL_USING_CLANG_COMPILER && ETL_COMPILER_FULL_VERSION >= 40000
#define ETL_CONSTINIT __attribute__((require_constant_initialization))
#elif ETL_USING_GCC_COMPILER && ETL_COMPILER_FULL_VERSION >= 100000
#define ETL_CONSTINIT __constinit
#else
#define ETL_CONSTINIT
#endif
#define ETL_NO_UNIQUE_ADDRESS
#define ETL_EXPLICIT_EXPR(...) explicit
#endif