Add constexpr loop

This commit is contained in:
BlackMark committed 2020-05-16 17:29:54 +02:00
1 parent 37c4f5543a
commit bc40515636
1 file changed
+6
+6
View File
@@ -101,4 +101,10 @@ inline constexpr auto make_offset_index_sequence()
return make_offset_integer_sequence<size_t, Offset, N>(); return make_offset_integer_sequence<size_t, Offset, N>();
} }
template <class Fn, size_t... Ints>
void for_constexpr(Fn &&func, index_sequence<Ints...>)
{
(func(type::integral_constant<size_t, Ints>{}), ...);
}
} // namespace util } // namespace util