Add constexpr loop

This commit is contained in:
BlackMark 2020-05-11 17:49:00 +02:00
parent 37c4f5543a
commit bc40515636

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