diff --git a/src/util/check.h b/src/util/check.h index 8f28f5dc941..187187e593e 100644 --- a/src/util/check.h +++ b/src/util/check.h @@ -42,9 +42,9 @@ void assertion_fail(std::string_view file, int line, std::string_view func, std: template constexpr T&& inline_assertion_check(LIFETIMEBOUND T&& val, [[maybe_unused]] const char* file, [[maybe_unused]] int line, [[maybe_unused]] const char* func, [[maybe_unused]] const char* assertion) { - if constexpr (IS_ASSERT + if (IS_ASSERT || std::is_constant_evaluated() #ifdef ABORT_ON_FAILED_ASSUME - || true + || true #endif ) { if (!val) {