1
0
Fork 0
mirror of https://github.com/Neargye/magic_enum.git synced 2026-01-10 23:44:29 +00:00

fix cmp_equal

This commit is contained in:
neargye 2020-08-18 10:19:05 +05:00
parent d085812be2
commit d0e279ae59

View file

@ -246,7 +246,7 @@ struct char_equal_to {
template <typename BinaryPredicate>
constexpr bool cmp_equal(std::string_view lhs, std::string_view rhs, BinaryPredicate&& p) noexcept(std::is_nothrow_invocable_r_v<bool, BinaryPredicate, char, char>) {
if constexpr (std::is_same_v<BinaryPredicate, char_equal_to>) {
if constexpr (std::is_same_v<std::decay_t<BinaryPredicate>, char_equal_to>) {
static_cast<void>(p);
return lhs == rhs;
} else {