core/type_traits: removed is_dereferenceable[_v]
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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 {}; }
|
||||
|
||||
Reference in New Issue
Block a user