Add constexpr loop
This commit is contained in:
parent
37c4f5543a
commit
bc40515636
6
util.hpp
6
util.hpp
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user