Added macro ETL_NOEXCEPT_IF that takes a compile time boolean expression

This commit is contained in:
John Wellbelove 2026-03-11 17:23:44 +00:00
parent 3e678aa810
commit ea7f21d11e

View File

@ -382,10 +382,12 @@ SOFTWARE.
#if ETL_USING_EXCEPTIONS
#define ETL_NOEXCEPT noexcept
#define ETL_NOEXCEPT_EXPR(...) noexcept(__VA_ARGS__)
#define ETL_NOEXCEPT_IF(b) noexcept((b))
#define ETL_NOEXCEPT_FROM(x) noexcept(noexcept(x))
#else
#define ETL_NOEXCEPT
#define ETL_NOEXCEPT_EXPR(...)
#define ETL_NOEXCEPT_IF(b)
#define ETL_NOEXCEPT_FROM(x)
#endif
#else
@ -662,7 +664,7 @@ namespace etl
static ETL_CONSTANT bool using_libc_wchar_h = (ETL_USING_LIBC_WCHAR_H == 1);
static ETL_CONSTANT bool using_std_exception = (ETL_USING_STD_EXCEPTION == 1);
static ETL_CONSTANT bool using_format_floating_point = (ETL_USING_FORMAT_FLOATING_POINT == 1);
// Has...
static ETL_CONSTANT bool has_initializer_list = (ETL_HAS_INITIALIZER_LIST == 1);
static ETL_CONSTANT bool has_8bit_types = (ETL_USING_8BIT_TYPES == 1);