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

Function enum_entries

include/magic_enum/magic_enum.hpp:1361–1366  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1359// Returns std::array with pairs (value, name), sorted by enum value.
1360template <typename E, detail::enum_subtype S = detail::subtype_v<E>>
1361[[nodiscard]] constexpr auto enum_entries() noexcept -> detail::enable_if_t<E, detail::entries_t<E, S>> {
1362 using D = std::decay_t<E>;
1363 static_assert(detail::is_reflected_v<D, S>, "magic_enum requires enum implementation and valid max and min.");
1364
1365 return detail::entries_v<D, S>;
1366}
1367
1368// Allows you to write magic_enum::enum_cast<foo>("bar", magic_enum::case_insensitive);
1369inline constexpr auto case_insensitive = detail::case_insensitive<>{};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected