| 58 | |
| 59 | template <typename E, enum_subtype S, typename F, std::size_t... I> |
| 60 | constexpr auto common_invocable(std::index_sequence<I...>) noexcept { |
| 61 | static_assert(std::is_enum_v<E>, "magic_enum::detail::invocable_index requires enum type."); |
| 62 | |
| 63 | if constexpr (count_v<E, S> == 0) { |
| 64 | return identity<nonesuch>{}; |
| 65 | } else { |
| 66 | return std::common_type<invoke_result_t<F, enum_constant<values_v<E, S>[I]>>...>{}; |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | template <typename E, enum_subtype S, typename Result, typename F> |
| 71 | constexpr auto result_type() noexcept { |
nothing calls this directly
no outgoing calls
no test coverage detected