Make constexpr for itself constexpr
This commit is contained in:
parent
bc462433ed
commit
632ed6cf41
2
util.hpp
2
util.hpp
@ -110,7 +110,7 @@ inline constexpr auto make_offset_index_sequence()
|
||||
}
|
||||
|
||||
template <typename Fn, size_t... Ints>
|
||||
auto for_constexpr(Fn &&func, index_sequence<Ints...>)
|
||||
constexpr auto for_constexpr(Fn &&func, index_sequence<Ints...>)
|
||||
{
|
||||
if constexpr (util::is_void_v<util::invoke_result_t<Fn, util::integral_constant<size_t, 0>>>) {
|
||||
(func(util::integral_constant<size_t, Ints>{}), ...);
|
||||
|
Loading…
Reference in New Issue
Block a user