Add constexpr loop

This commit is contained in:
BlackMark committed 2020-05-11 17:49:00 +02:00
1 parent b27fa9c003
commit 2f2f203be4
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>();
}
template <class Fn, size_t... Ints>
void for_constexpr(Fn &&func, index_sequence<Ints...>)
{
(func(type::integral_constant<size_t, Ints>{}), ...);
}
} // namespace util