Make constexpr for itself constexpr

This commit is contained in:
BlackMark 2022-01-11 00:09:01 +01:00
parent bc462433ed
commit 632ed6cf41

View File

@ -110,7 +110,7 @@ inline constexpr auto make_offset_index_sequence()
} }
template <typename Fn, size_t... Ints> 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>>>) { if constexpr (util::is_void_v<util::invoke_result_t<Fn, util::integral_constant<size_t, 0>>>) {
(func(util::integral_constant<size_t, Ints>{}), ...); (func(util::integral_constant<size_t, Ints>{}), ...);