1
0
Fork 0
mirror of https://github.com/Neargye/magic_enum.git synced 2026-01-09 23:34:23 +00:00
This commit is contained in:
neargye 2022-11-09 00:00:34 +04:00
parent 612033ab5d
commit 684718c58b

View file

@ -130,7 +130,7 @@ constexpr decltype(auto) constexpr_switch_impl(F&& f, E value, Def&& def) {
template <typename R, typename E, typename F, typename Def> template <typename R, typename E, typename F, typename Def>
constexpr decltype(auto) constexpr_switch(F&& f, E value, Def&& def) { constexpr decltype(auto) constexpr_switch(F&& f, E value, Def&& def) {
static_assert(is_enum_v<E>, "magic_enum::detail::constexpr_switch_impl requires enum type."); static_assert(is_enum_v<E>, "magic_enum::detail::constexpr_switch requires enum type.");
if constexpr (count_v<E> == 0) { if constexpr (count_v<E> == 0) {
return def(); return def();