Explorar el Código

resource_cache: use actual template parameters on sfinae expressions

Michele Caini hace 4 años
padre
commit
f5ac73f681
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/entt/resource/cache.hpp

+ 1 - 1
src/entt/resource/cache.hpp

@@ -44,7 +44,7 @@ public:
     resource_cache_iterator(const It iter) ENTT_NOEXCEPT
         : it{iter} {}
 
-    template<typename Other, typename = std::enable_if_t<std::is_const_v<Type>>>
+    template<typename Other, typename = std::enable_if_t<!std::is_same_v<It, Other> && std::is_constructible_v<It, Other>>>
     resource_cache_iterator(const resource_cache_iterator<std::remove_const_t<Type>, Other> &other) ENTT_NOEXCEPT
         : it{other.it} {}