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

Function enum_names

include/magic_enum/magic_enum.hpp:1352–1357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1350// Returns std::array with names, sorted by enum value.
1351template <typename E, detail::enum_subtype S = detail::subtype_v<E>>
1352[[nodiscard]] constexpr auto enum_names() noexcept -> detail::enable_if_t<E, detail::names_t<E, S>> {
1353 using D = std::decay_t<E>;
1354 static_assert(detail::is_reflected_v<D, S>, "magic_enum requires enum implementation and valid max and min.");
1355
1356 return detail::names_v<D, S>;
1357}
1358
1359// Returns std::array with pairs (value, name), sorted by enum value.
1360template <typename E, detail::enum_subtype S = detail::subtype_v<E>>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected