| 1359 | // Returns std::array with pairs (value, name), sorted by enum value. |
| 1360 | template <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); |
| 1369 | inline constexpr auto case_insensitive = detail::case_insensitive<>{}; |
nothing calls this directly
no outgoing calls
no test coverage detected