|
@@ -1,6 +1,7 @@
|
|
|
#ifndef ENTT_COMMON_TRANSPARENT_EQUAL_TO_H
|
|
#ifndef ENTT_COMMON_TRANSPARENT_EQUAL_TO_H
|
|
|
#define ENTT_COMMON_TRANSPARENT_EQUAL_TO_H
|
|
#define ENTT_COMMON_TRANSPARENT_EQUAL_TO_H
|
|
|
|
|
|
|
|
|
|
+#include <concepts>
|
|
|
#include <type_traits>
|
|
#include <type_traits>
|
|
|
|
|
|
|
|
namespace test {
|
|
namespace test {
|
|
@@ -8,9 +9,8 @@ namespace test {
|
|
|
struct transparent_equal_to {
|
|
struct transparent_equal_to {
|
|
|
using is_transparent = void;
|
|
using is_transparent = void;
|
|
|
|
|
|
|
|
- template<typename Type, typename Other>
|
|
|
|
|
- constexpr std::enable_if_t<std::is_convertible_v<Other, Type>, bool>
|
|
|
|
|
- operator()(const Type &lhs, const Other &rhs) const {
|
|
|
|
|
|
|
+ template<typename Type, std::convertible_to<Type> Other>
|
|
|
|
|
+ constexpr bool operator()(const Type &lhs, const Other &rhs) const {
|
|
|
return lhs == static_cast<Type>(rhs);
|
|
return lhs == static_cast<Type>(rhs);
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|