MCPcopy Create free account
hub / github.com/Neargye/magic_enum / values_ors

Function values_ors

include/magic_enum/magic_enum_flags.hpp:51–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49
50template <typename E, enum_subtype S, typename U = std::underlying_type_t<E>>
51constexpr 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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected