Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
Fix std::allocator traits
Browse files Browse the repository at this point in the history
  • Loading branch information
gevtushenko committed Sep 8, 2021
1 parent ed84044 commit 926f092
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions thrust/detail/allocator/allocator_traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
#include <thrust/detail/type_traits/has_member_function.h>
#include <thrust/detail/type_traits.h>

#include <memory>

THRUST_NAMESPACE_BEGIN
namespace detail
{
Expand Down Expand Up @@ -70,6 +72,23 @@ template<typename Alloc, typename U>
typedef thrust::detail::integral_constant<bool, value> type;
};

#if THRUST_CPP_DIALECT >= 2017
#define THRUST_SPECIALIZE_DEPRECATED(trait_name) \
template <typename T> \
struct trait_name<std::allocator<T>> : false_type {};

THRUST_SPECIALIZE_DEPRECATED(has_is_always_equal)
THRUST_SPECIALIZE_DEPRECATED(has_pointer)
THRUST_SPECIALIZE_DEPRECATED(has_const_pointer)
THRUST_SPECIALIZE_DEPRECATED(has_reference)
THRUST_SPECIALIZE_DEPRECATED(has_const_reference)

#undef THRUST_SPECIALIZE_DEPRECATED

template<typename T, typename U>
struct has_rebind<std::allocator<T>, U> : false_type {};
#endif

template<typename T>
struct nested_pointer
{
Expand Down

0 comments on commit 926f092

Please sign in to comment.