From d0e279ae597456c157545665b096a6c742910a51 Mon Sep 17 00:00:00 2001 From: neargye Date: Tue, 18 Aug 2020 10:19:05 +0500 Subject: [PATCH] fix cmp_equal --- include/magic_enum.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/magic_enum.hpp b/include/magic_enum.hpp index d7dfbc7..004c6f4 100644 --- a/include/magic_enum.hpp +++ b/include/magic_enum.hpp @@ -246,7 +246,7 @@ struct char_equal_to { template constexpr bool cmp_equal(std::string_view lhs, std::string_view rhs, BinaryPredicate&& p) noexcept(std::is_nothrow_invocable_r_v) { - if constexpr (std::is_same_v) { + if constexpr (std::is_same_v, char_equal_to>) { static_cast(p); return lhs == rhs; } else {