From fa69a5f4b76a4e2a02db6c32d9c3311ce5fe29bd Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Thu, 24 Oct 2024 17:09:46 +0200 Subject: [PATCH] util: Treat Assume as Assert when evaluating at compile-time --- src/util/check.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) {