From 3413dadfae0d471044ce460b39014ebbf4ff3763 Mon Sep 17 00:00:00 2001 From: Patrick Date: Wed, 24 Jul 2024 16:00:53 +0200 Subject: [PATCH] added constexpr and static_assert to REPEAT_FOR_TYPES --- test/common_helper/test.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/common_helper/test.hpp b/test/common_helper/test.hpp index cee1430..2242e30 100644 --- a/test/common_helper/test.hpp +++ b/test/common_helper/test.hpp @@ -294,11 +294,11 @@ constexpr auto _repeat_for_types(auto f) { #define REPEAT_FOR_TYPES(func, ...) { \ auto r = _repeat_for_types<__VA_ARGS__>(func); \ - auto it = std::ranges::find_if(r, [](auto&& e) { return e.val == ReturnCode::FAILED; }); \ + auto it = std::ranges::find_if(r, [](auto&& e) constexpr { return e.val == ReturnCode::FAILED; }); \ if (it != std::ranges::end(r)) { \ return *it; \ } \ -} +} static_assert(true, "") #define CREATE_FROM_IL(type, il, len) \