Skip to content

Commit 0403ea8

Browse files
committed
Use iterator_traits
1 parent 34b7a91 commit 0403ea8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

thrust/thrust/mr/allocator.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#include <thrust/mr/polymorphic_adaptor.h>
3838
#include <thrust/mr/validator.h>
3939

40+
#include <cuda/std/__iterator/iterator_traits.h>
4041
#include <cuda/std/limits>
4142

4243
THRUST_NAMESPACE_BEGIN
@@ -70,9 +71,9 @@ class allocator : private validator<MR>
7071
/*! The pointer to const type. Equivalent to a pointer type of \p MR rebound to <tt>const T</tt>. */
7172
using const_pointer = typename thrust::detail::pointer_traits<void_pointer>::template rebind<const T>::other;
7273
/*! The reference to the type allocated by this allocator. Supports smart references. */
73-
using reference = typename thrust::detail::pointer_traits<pointer>::reference;
74+
using reference = typename ::cuda::std::iterator_traits<pointer>::reference;
7475
/*! The const reference to the type allocated by this allocator. Supports smart references. */
75-
using const_reference = typename thrust::detail::pointer_traits<const_pointer>::reference;
76+
using const_reference = typename ::cuda::std::iterator_traits<const_pointer>::reference;
7677
/*! The size type of this allocator. Always \p std::size_t. */
7778
using size_type = std::size_t;
7879
/*! The difference type between pointers allocated by this allocator. */

0 commit comments

Comments
 (0)