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

Function enum_count

include/magic_enum/magic_enum.hpp:1214–1216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1212// Returns number of enum values.
1213template <typename E, detail::enum_subtype S = detail::subtype_v<E>>
1214[[nodiscard]] constexpr auto enum_count() noexcept -> detail::enable_if_t<E, std::size_t> {
1215 return detail::count_v<std::decay_t<E>, S>;
1216}
1217
1218// Returns enum value at specified index.
1219// No bounds checking is performed: the behavior is undefined if index >= number of enum values.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected