Explorar el Código

test: internal changes

skypjack hace 1 mes
padre
commit
c2e7139a70
Se han modificado 2 ficheros con 6 adiciones y 4 borrados
  1. 3 3
      test/common/transparent_equal_to.h
  2. 3 1
      test/entt/entity/reactive_mixin.cpp

+ 3 - 3
test/common/transparent_equal_to.h

@@ -1,6 +1,7 @@
 #ifndef ENTT_COMMON_TRANSPARENT_EQUAL_TO_H
 #define ENTT_COMMON_TRANSPARENT_EQUAL_TO_H
 
+#include <concepts>
 #include <type_traits>
 
 namespace test {
@@ -8,9 +9,8 @@ namespace test {
 struct transparent_equal_to {
     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);
     }
 };

+ 3 - 1
test/entt/entity/reactive_mixin.cpp

@@ -1,4 +1,5 @@
 #include <array>
+#include <concepts>
 #include <cstddef>
 #include <iterator>
 #include <memory>
@@ -38,7 +39,8 @@ struct ReactiveMixin: ReactiveMixinBase {
 };
 
 template<typename Type>
-struct entt::storage_type<Type, ReactiveMixinBase::my_entity, std::allocator<Type>, std::enable_if_t<!std::is_same_v<Type, ReactiveMixinBase::my_entity>>> {
+requires (!std::same_as<Type, ReactiveMixinBase::my_entity>)
+struct entt::storage_type<Type, ReactiveMixinBase::my_entity, std::allocator<Type>> {
     using type = entt::basic_sigh_mixin<entt::basic_storage<Type, ReactiveMixinBase::my_entity>, test::custom_registry<ReactiveMixinBase::my_entity>>;
 };