| 49 | |
| 50 | template <typename E, enum_subtype S, typename U = std::underlying_type_t<E>> |
| 51 | constexpr U values_ors() noexcept { |
| 52 | static_assert(S == enum_subtype::flags, "magic_enum::detail::values_ors requires valid subtype."); |
| 53 | |
| 54 | auto ors = U{0}; |
| 55 | for (std::size_t i = 0; i < count_v<E, S>; ++i) { |
| 56 | ors |= static_cast<U>(values_v<E, S>[i]); |
| 57 | } |
| 58 | |
| 59 | return ors; |
| 60 | } |
| 61 | |
| 62 | } // namespace magic_enum::detail |
| 63 |
nothing calls this directly
no outgoing calls
no test coverage detected