Browse Source

minor changes

Michele Caini 7 years ago
parent
commit
f7dec412ec
1 changed files with 9 additions and 1 deletions
  1. 9 1
      src/entt/core/type_traits.hpp

+ 9 - 1
src/entt/core/type_traits.hpp

@@ -53,6 +53,14 @@ struct shared_traits<const Type>
 {};
 
 
+/**
+ * @brief Helper type.
+ * @tparam Type Potentially shared type.
+ */
+template<typename Type>
+using shared_traits_t = typename shared_traits<Type>::type;
+
+
 /**
  * @brief Provides the member constant `value` to true if a given type is
  * shared. In all other cases, `value` is false.
@@ -67,7 +75,7 @@ struct is_shared: std::false_type {};
  * @tparam Type Potentially shared type.
  */
 template<typename Type>
-struct is_shared<Type, std::void_t<typename shared_traits<std::decay_t<Type>>::type>>: std::true_type {};
+struct is_shared<Type, std::void_t<shared_traits_t<std::decay_t<Type>>>>: std::true_type {};
 
 
 /**