소스 검색

core/type_traits: removed is_dereferenceable[_v]

Michele Caini 5 년 전
부모
커밋
613f993638
2개의 변경된 파일0개의 추가작업 그리고 31개의 파일을 삭제
  1. 0 24
      src/entt/core/type_traits.hpp
  2. 0 7
      test/entt/core/type_traits.cpp

+ 0 - 24
src/entt/core/type_traits.hpp

@@ -206,30 +206,6 @@ template<class Type>
 inline constexpr auto is_equality_comparable_v = is_equality_comparable<Type>::value;
 
 
-/**
- * @brief Provides the member constant `value` to true if a given type is
- * dereferenceable, false otherwise.
- * @tparam Type Potentially dereferenceable type.
- */
-template<typename Type, typename = void>
-struct is_dereferenceable: std::false_type {};
-
-
-/*! @copydoc is_dereferenceable */
-template<typename Type>
-struct is_dereferenceable<Type, std::void_t<decltype(*std::declval<Type>())>>
-        : std::true_type
-{};
-
-
-/**
- * @brief Helper variable template.
- * @tparam Type Potentially dereferenceable type.
- */
-template<typename Type>
-inline constexpr auto is_dereferenceable_v = is_dereferenceable<Type>::value;
-
-
 /**
  * @brief Extracts the class of a non-static member object or function.
  * @tparam Member A pointer to a non-static member object or function.

+ 0 - 7
test/entt/core/type_traits.cpp

@@ -52,13 +52,6 @@ TEST(TypeTraits, IsEqualityComparable) {
     ASSERT_FALSE(entt::is_equality_comparable_v<void>);
 }
 
-TEST(TypeTraits, IsDereferenceable) {
-    ASSERT_TRUE(entt::is_dereferenceable_v<int *>);
-    ASSERT_TRUE(entt::is_dereferenceable_v<std::shared_ptr<int>>);
-    ASSERT_TRUE(entt::is_dereferenceable_v<std::unique_ptr<int>>);
-    ASSERT_FALSE(entt::is_dereferenceable_v<int>);
-}
-
 TEST(TypeTraits, MemberClass) {
     struct clazz {
         char foo(int) { return {}; }