1616#include < thrust/detail/allocator/allocator_system.h>
1717#include < thrust/detail/copy.h>
1818#include < thrust/detail/execution_policy.h>
19- #include < thrust/detail/type_traits/pointer_traits.h>
2019#include < thrust/for_each.h>
2120#include < thrust/iterator/iterator_traits.h>
2221#include < thrust/iterator/zip_iterator.h>
2524#include < cuda/std/__iterator/advance.h>
2625#include < cuda/std/__iterator/distance.h>
2726#include < cuda/std/__memory/allocator_traits.h>
27+ #include < cuda/std/__memory/pointer_traits.h>
2828#include < cuda/std/__type_traits/is_convertible.h>
2929#include < cuda/std/__type_traits/is_trivially_copy_constructible.h>
3030#include < cuda/std/tuple>
@@ -151,7 +151,8 @@ template <typename System, typename Allocator, typename InputIterator, typename
151151_CCCL_HOST_DEVICE Pointer copy_construct_range (
152152 thrust::execution_policy<System>& from_system, Allocator& a, InputIterator first, InputIterator last, Pointer result)
153153{
154- if constexpr (needs_copy_construct_via_allocator<Allocator, typename pointer_element<Pointer>::type>)
154+ if constexpr (needs_copy_construct_via_allocator<Allocator,
155+ typename ::cuda::std::pointer_traits<Pointer>::element_type>)
155156 {
156157 return uninitialized_copy_with_allocator (a, from_system, allocator_system<Allocator>::get (a), first, last, result);
157158 }
@@ -166,7 +167,8 @@ template <typename System, typename Allocator, typename InputIterator, typename
166167_CCCL_HOST_DEVICE Pointer copy_construct_range_n (
167168 thrust::execution_policy<System>& from_system, Allocator& a, InputIterator first, Size n, Pointer result)
168169{
169- if constexpr (needs_copy_construct_via_allocator<Allocator, typename pointer_element<Pointer>::type>)
170+ if constexpr (needs_copy_construct_via_allocator<Allocator,
171+ typename ::cuda::std::pointer_traits<Pointer>::element_type>)
170172 {
171173 return uninitialized_copy_with_allocator_n (a, from_system, allocator_system<Allocator>::get (a), first, n, result);
172174 }
0 commit comments