2929#include < thrust/detail/allocator/allocator_system.h>
3030#include < thrust/detail/copy.h>
3131#include < thrust/detail/execution_policy.h>
32- #include < thrust/detail/type_traits/pointer_traits.h>
3332#include < thrust/for_each.h>
3433#include < thrust/iterator/iterator_traits.h>
3534#include < thrust/iterator/zip_iterator.h>
3837#include < cuda/std/__iterator/advance.h>
3938#include < cuda/std/__iterator/distance.h>
4039#include < cuda/std/__memory/allocator_traits.h>
40+ #include < cuda/std/__memory/pointer_traits.h>
4141#include < cuda/std/__type_traits/is_convertible.h>
4242#include < cuda/std/__type_traits/is_trivially_copy_constructible.h>
4343#include < cuda/std/tuple>
@@ -164,7 +164,8 @@ template <typename System, typename Allocator, typename InputIterator, typename
164164_CCCL_HOST_DEVICE Pointer copy_construct_range (
165165 thrust::execution_policy<System>& from_system, Allocator& a, InputIterator first, InputIterator last, Pointer result)
166166{
167- if constexpr (needs_copy_construct_via_allocator<Allocator, typename pointer_element<Pointer>::type>)
167+ if constexpr (needs_copy_construct_via_allocator<Allocator,
168+ typename ::cuda::std::pointer_traits<Pointer>::element_type>)
168169 {
169170 return uninitialized_copy_with_allocator (a, from_system, allocator_system<Allocator>::get (a), first, last, result);
170171 }
@@ -179,7 +180,8 @@ template <typename System, typename Allocator, typename InputIterator, typename
179180_CCCL_HOST_DEVICE Pointer copy_construct_range_n (
180181 thrust::execution_policy<System>& from_system, Allocator& a, InputIterator first, Size n, Pointer result)
181182{
182- if constexpr (needs_copy_construct_via_allocator<Allocator, typename pointer_element<Pointer>::type>)
183+ if constexpr (needs_copy_construct_via_allocator<Allocator,
184+ typename ::cuda::std::pointer_traits<Pointer>::element_type>)
183185 {
184186 return uninitialized_copy_with_allocator_n (a, from_system, allocator_system<Allocator>::get (a), first, n, result);
185187 }
0 commit comments