Explorar el Código

type_traits: minor changes

Michele Caini hace 4 años
padre
commit
e012250e0a
Se han modificado 1 ficheros con 9 adiciones y 9 borrados
  1. 9 9
      src/entt/core/type_traits.hpp

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

@@ -83,7 +83,7 @@ struct size_of<Type, std::void_t<decltype(sizeof(Type))>>
  * @tparam Type The type of which to return the size.
  */
 template<class Type>
-inline constexpr auto size_of_v = size_of<Type>::value;
+inline constexpr std::size_t size_of_v = size_of<Type>::value;
 
 
 /**
@@ -288,7 +288,7 @@ struct type_list_contains<type_list<Type...>, Other>: std::disjunction<std::is_s
  * @tparam Type Type to look for.
  */
 template<class List, typename Type>
-inline constexpr auto type_list_contains_v = type_list_contains<List, Type>::value;
+inline constexpr bool type_list_contains_v = type_list_contains<List, Type>::value;
 
 
 /*! @brief Primary template isn't defined on purpose. */
@@ -481,7 +481,7 @@ struct is_equality_comparable: std::bool_constant<internal::is_equality_comparab
  * @tparam Type The type to test.
  */
 template<class Type>
-inline constexpr auto is_equality_comparable_v = is_equality_comparable<Type>::value;
+inline constexpr bool is_equality_comparable_v = is_equality_comparable<Type>::value;
 
 
 /*! @brief Same as std::is_invocable, but with tuples. */
@@ -515,7 +515,7 @@ struct is_applicable<Func, const Tuple<Args...>>: std::is_invocable<Func, Args..
  * @tparam Args The list of arguments to use to probe the function type.
  */
 template<typename Func, typename Args>
-inline constexpr auto is_applicable_v = is_applicable<Func, Args>::value;
+inline constexpr bool is_applicable_v = is_applicable<Func, Args>::value;
 
 
 /*! @brief Same as std::is_invocable_r, but with tuples for arguments. */
@@ -542,7 +542,7 @@ struct is_applicable_r<Ret, Func, std::tuple<Args...>>: std::is_invocable_r<Ret,
  * @tparam Args The list of arguments to use to probe the function type.
  */
 template<typename Ret, typename Func, typename Args>
-inline constexpr auto is_applicable_r_v = is_applicable_r<Ret, Func, Args>::value;
+inline constexpr bool is_applicable_r_v = is_applicable_r<Ret, Func, Args>::value;
 
 
 /**
@@ -564,7 +564,7 @@ struct is_complete<Type, std::void_t<decltype(sizeof(Type))>>: std::true_type {}
  * @tparam Type The type to test.
  */
 template<typename Type>
-inline constexpr auto is_complete_v = is_complete<Type>::value;
+inline constexpr bool is_complete_v = is_complete<Type>::value;
 
 
 /**
@@ -588,7 +588,7 @@ struct is_iterator<Type, std::void_t<typename std::iterator_traits<Type>::iterat
  * @tparam Type The type to test.
  */
 template<typename Type>
-inline constexpr auto is_iterator_v = is_iterator<Type>::value;
+inline constexpr bool is_iterator_v = is_iterator<Type>::value;
 
 
 /**
@@ -610,7 +610,7 @@ struct is_iterator_type<Type, It, std::enable_if_t<is_iterator_v<Type> && std::i
 
 /*! @copydoc is_iterator_type */
 template<typename Type, typename It>
-struct is_iterator_type<Type, It, std::void_t<typename It::iterator_type>>
+struct is_iterator_type<Type, It, std::enable_if_t<!std::is_same_v<Type, It>, std::void_t<typename It::iterator_type>>>
     : is_iterator_type<Type, typename It::iterator_type>
 {};
 
@@ -621,7 +621,7 @@ struct is_iterator_type<Type, It, std::void_t<typename It::iterator_type>>
  * @tparam It Required iterator type.
  */
 template<typename Type, typename It>
-inline constexpr auto is_iterator_type_v = is_iterator_type<Type, It>::value;
+inline constexpr bool is_iterator_type_v = is_iterator_type<Type, It>::value;
 
 
 /**