This repository was archived by the owner on Mar 21, 2024. It is now read-only.
File tree 1 file changed +21
-0
lines changed 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 26
26
#include < thrust/detail/type_traits/has_member_function.h>
27
27
#include < thrust/detail/type_traits.h>
28
28
29
+ #include < memory>
30
+
29
31
THRUST_NAMESPACE_BEGIN
30
32
namespace detail
31
33
{
@@ -70,6 +72,25 @@ template<typename Alloc, typename U>
70
72
typedef thrust::detail::integral_constant<bool , value> type;
71
73
};
72
74
75
+ // The following fields of std::allocator have been deprecated (since C++17).
76
+ // There's no way to detect it other than explicit specialization.
77
+ #if THRUST_CPP_DIALECT >= 2017
78
+ #define THRUST_SPECIALIZE_DEPRECATED (trait_name ) \
79
+ template <typename T> \
80
+ struct trait_name <std::allocator<T>> : false_type {};
81
+
82
+ THRUST_SPECIALIZE_DEPRECATED (has_is_always_equal)
83
+ THRUST_SPECIALIZE_DEPRECATED(has_pointer)
84
+ THRUST_SPECIALIZE_DEPRECATED(has_const_pointer)
85
+ THRUST_SPECIALIZE_DEPRECATED(has_reference)
86
+ THRUST_SPECIALIZE_DEPRECATED(has_const_reference)
87
+
88
+ #undef THRUST_SPECIALIZE_DEPRECATED
89
+
90
+ template <typename T, typename U>
91
+ struct has_rebind <std::allocator<T>, U> : false_type {};
92
+ #endif
93
+
73
94
template <typename T>
74
95
struct nested_pointer
75
96
{
You can’t perform that action at this time.
0 commit comments