From bc405156369d16071c43f2e9dc1ee30fe4aab25f Mon Sep 17 00:00:00 2001 From: BlackMark Date: Mon, 11 May 2020 17:49:00 +0200 Subject: [PATCH] Add constexpr loop --- util.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/util.hpp b/util.hpp index e074bba..4b2e85a 100644 --- a/util.hpp +++ b/util.hpp @@ -101,4 +101,10 @@ inline constexpr auto make_offset_index_sequence() return make_offset_integer_sequence(); } +template +void for_constexpr(Fn &&func, index_sequence) +{ + (func(type::integral_constant{}), ...); +} + } // namespace util