From 97e6f35c464aa1feb5fe983ee74d66e88bd47639 Mon Sep 17 00:00:00 2001 From: neargye Date: Sat, 6 Jun 2020 14:01:17 +0500 Subject: [PATCH] add missing static_assert --- include/magic_enum.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/magic_enum.hpp b/include/magic_enum.hpp index 75d3902..e8fc94a 100644 --- a/include/magic_enum.hpp +++ b/include/magic_enum.hpp @@ -222,6 +222,8 @@ inline constexpr auto name_v = n(); template constexpr bool is_valid() noexcept { + static_assert(is_enum_v, "magic_enum::detail::is_valid requires enum type."); + return n(V)>().size() != 0; }