diff --git a/include/nameof.hpp b/include/nameof.hpp index ca4f979..5d80286 100644 --- a/include/nameof.hpp +++ b/include/nameof.hpp @@ -111,7 +111,7 @@ template } template -[[nodiscard]] constexpr decltype(auto) enum_names_impl(std::integer_sequence) noexcept { +[[nodiscard]] constexpr auto enum_names_impl(std::integer_sequence) noexcept { static_assert(std::is_enum_v, "nameof::detail::enum_names_impl requires enum type."); constexpr std::array names{{nameof_enum_impl(I + O)>()...}};