diff --git a/thrust/examples/bucket_sort2d.cu b/thrust/examples/bucket_sort2d.cu index 9d1d2561083..aac7147411e 100644 --- a/thrust/examples/bucket_sort2d.cu +++ b/thrust/examples/bucket_sort2d.cu @@ -12,7 +12,7 @@ #include "include/host_device.h" // define a 2d float vector -typedef thrust::tuple vec2; +using vec2 = thrust::tuple; // return a random vec2 in [0,1)^2 vec2 make_random_vec2() diff --git a/thrust/examples/counting_iterator.cu b/thrust/examples/counting_iterator.cu index c420b4d25e5..2979359b61d 100644 --- a/thrust/examples/counting_iterator.cu +++ b/thrust/examples/counting_iterator.cu @@ -29,7 +29,7 @@ int main() thrust::counting_iterator last = first + 8; // compute indices of nonzero elements - typedef thrust::device_vector::iterator IndexIterator; + using IndexIterator = thrust::device_vector::iterator; IndexIterator indices_end = thrust::copy_if(first, last, stencil.begin(), indices.begin(), thrust::identity()); // indices now contains [1,2,5,7] diff --git a/thrust/examples/cuda/custom_temporary_allocation.cu b/thrust/examples/cuda/custom_temporary_allocation.cu index 009397252f1..0eee3bbf3d1 100644 --- a/thrust/examples/cuda/custom_temporary_allocation.cu +++ b/thrust/examples/cuda/custom_temporary_allocation.cu @@ -49,7 +49,7 @@ private: // A simple allocator for caching cudaMalloc allocations. struct cached_allocator { - typedef char value_type; + using value_type = char; cached_allocator() {} @@ -120,8 +120,8 @@ struct cached_allocator } private: - typedef std::multimap free_blocks_type; - typedef std::map allocated_blocks_type; + using free_blocks_type = std::multimap; + using allocated_blocks_type = std::map; free_blocks_type free_blocks; allocated_blocks_type allocated_blocks; diff --git a/thrust/examples/cuda/global_device_vector.cu b/thrust/examples/cuda/global_device_vector.cu index 35c08c88615..822aaf35599 100644 --- a/thrust/examples/cuda/global_device_vector.cu +++ b/thrust/examples/cuda/global_device_vector.cu @@ -19,9 +19,8 @@ extern "C" cudaError_t cudaFreeIgnoreShutdown(void* ptr) return err; } -typedef thrust::system::cuda::detail:: - cuda_memory_resource> - device_ignore_shutdown_memory_resource; +using device_ignore_shutdown_memory_resource = + thrust::system::cuda::detail::cuda_memory_resource>; template using device_ignore_shutdown_allocator = diff --git a/thrust/examples/cuda/range_view.cu b/thrust/examples/cuda/range_view.cu index 10a65925619..b4c9a1dd286 100644 --- a/thrust/examples/cuda/range_view.cu +++ b/thrust/examples/cuda/range_view.cu @@ -19,11 +19,11 @@ template class range_view { public: - typedef Iterator iterator; - typedef typename thrust::iterator_traits::value_type value_type; - typedef typename thrust::iterator_traits::pointer pointer; - typedef typename thrust::iterator_traits::difference_type difference_type; - typedef typename thrust::iterator_traits::reference reference; + using iterator = Iterator; + using value_type = typename thrust::iterator_traits::value_type; + using pointer = typename thrust::iterator_traits::pointer; + using difference_type = typename thrust::iterator_traits::difference_type; + using reference = typename thrust::iterator_traits::reference; private: const iterator first; diff --git a/thrust/examples/dot_products_with_zip.cu b/thrust/examples/dot_products_with_zip.cu index 3c82994598f..c73189caf04 100644 --- a/thrust/examples/dot_products_with_zip.cu +++ b/thrust/examples/dot_products_with_zip.cu @@ -14,7 +14,7 @@ // into a single virtual Float3 array. // We'll use a 3-tuple to store our 3d vector type -typedef thrust::tuple Float3; +using Float3 = thrust::tuple; // This functor implements the dot product between 3d vectors struct DotProduct : public thrust::binary_function @@ -74,9 +74,9 @@ int main() // METHOD #1 // Defining a zip_iterator type can be a little cumbersome ... - typedef thrust::device_vector::iterator FloatIterator; - typedef thrust::tuple FloatIteratorTuple; - typedef thrust::zip_iterator Float3Iterator; + using FloatIterator = thrust::device_vector::iterator; + using FloatIteratorTuple = thrust::tuple; + using Float3Iterator = thrust::zip_iterator; // Now we'll create some zip_iterators for A and B Float3Iterator A_first = thrust::make_zip_iterator(thrust::make_tuple(A0.begin(), A1.begin(), A2.begin())); diff --git a/thrust/examples/expand.cu b/thrust/examples/expand.cu index c2d0984cb8a..ecded38ffd8 100644 --- a/thrust/examples/expand.cu +++ b/thrust/examples/expand.cu @@ -20,7 +20,7 @@ template OutputIterator expand(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, OutputIterator output) { - typedef typename thrust::iterator_difference::type difference_type; + using difference_type = typename thrust::iterator_difference::type; difference_type input_size = thrust::distance(first1, last1); difference_type output_size = thrust::reduce(first1, last1); @@ -53,7 +53,7 @@ OutputIterator expand(InputIterator1 first1, InputIterator1 last1, InputIterator template void print(const std::string& s, const Vector& v) { - typedef typename Vector::value_type T; + using T = typename Vector::value_type; std::cout << s; thrust::copy(v.begin(), v.end(), std::ostream_iterator(std::cout, " ")); diff --git a/thrust/examples/histogram.cu b/thrust/examples/histogram.cu index 660e390eb37..dc874667fe1 100644 --- a/thrust/examples/histogram.cu +++ b/thrust/examples/histogram.cu @@ -49,7 +49,7 @@ template void print_vector(const std::string& name, const Vector& v) { - typedef typename Vector::value_type T; + using T = typename Vector::value_type; std::cout << " " << std::setw(20) << name << " "; thrust::copy(v.begin(), v.end(), std::ostream_iterator(std::cout, " ")); std::cout << std::endl; @@ -59,8 +59,8 @@ void print_vector(const std::string& name, const Vector& v) template void dense_histogram(const Vector1& input, Vector2& histogram) { - typedef typename Vector1::value_type ValueType; // input value type - typedef typename Vector2::value_type IndexType; // histogram index type + using ValueType = typename Vector1::value_type; // input value type + using IndexType = typename Vector2::value_type; // histogram index type // copy input data (could be skipped if input is allowed to be modified) thrust::device_vector data(input); @@ -98,8 +98,8 @@ void dense_histogram(const Vector1& input, Vector2& histogram) template void sparse_histogram(const Vector1& input, Vector2& histogram_values, Vector3& histogram_counts) { - typedef typename Vector1::value_type ValueType; // input value type - typedef typename Vector3::value_type IndexType; // histogram index type + using ValueType = typename Vector1::value_type; // input value type + using IndexType = typename Vector3::value_type; // histogram index type // copy input data (could be skipped if input is allowed to be modified) thrust::device_vector data(input); diff --git a/thrust/examples/mr_basic.cu b/thrust/examples/mr_basic.cu index 196b5222f31..7353b35dfe4 100644 --- a/thrust/examples/mr_basic.cu +++ b/thrust/examples/mr_basic.cu @@ -30,7 +30,7 @@ int main() { // no virtual calls will be issued - typedef thrust::mr::allocator Alloc; + using Alloc = thrust::mr::allocator; Alloc alloc(&memres); do_stuff_with_vector>(alloc); @@ -39,7 +39,7 @@ int main() { // virtual calls will be issued - wrapping in a polymorphic wrapper thrust::mr::polymorphic_adaptor_resource adaptor(&memres); - typedef thrust::mr::polymorphic_allocator Alloc; + using Alloc = thrust::mr::polymorphic_allocator; Alloc alloc(&adaptor); do_stuff_with_vector>(alloc); @@ -47,30 +47,29 @@ int main() { // use the global device_ptr-flavored device memory resource - typedef thrust::device_ptr_memory_resource Resource; + using Resource = thrust::device_ptr_memory_resource; thrust::mr::polymorphic_adaptor_resource> adaptor( thrust::mr::get_global_resource()); - typedef thrust::mr::polymorphic_allocator> Alloc; + using Alloc = thrust::mr::polymorphic_allocator>; Alloc alloc(&adaptor); do_stuff_with_vector>(alloc); } - typedef thrust::mr::unsynchronized_pool_resource Pool; + using Pool = thrust::mr::unsynchronized_pool_resource; Pool pool(&memres); { - typedef thrust::mr::allocator Alloc; + using Alloc = thrust::mr::allocator; Alloc alloc(&pool); do_stuff_with_vector>(alloc); } - typedef thrust::mr::disjoint_unsynchronized_pool_resource - DisjointPool; + using DisjointPool = + thrust::mr::disjoint_unsynchronized_pool_resource; DisjointPool disjoint_pool(&memres, &memres); { - typedef thrust::mr::allocator Alloc; + using Alloc = thrust::mr::allocator; Alloc alloc(&disjoint_pool); do_stuff_with_vector>(alloc); diff --git a/thrust/examples/padded_grid_reduction.cu b/thrust/examples/padded_grid_reduction.cu index b96a7b0e8f9..71694781ed0 100644 --- a/thrust/examples/padded_grid_reduction.cu +++ b/thrust/examples/padded_grid_reduction.cu @@ -24,8 +24,8 @@ template struct transform_tuple : public thrust::unary_function, thrust::tuple> { - typedef typename thrust::tuple InputTuple; - typedef typename thrust::tuple OutputTuple; + using InputTuple = typename thrust::tuple; + using OutputTuple = typename thrust::tuple; IndexType n, N; @@ -49,7 +49,7 @@ struct reduce_tuple thrust::tuple, thrust::tuple> { - typedef typename thrust::tuple Tuple; + using Tuple = typename thrust::tuple; __host__ __device__ Tuple operator()(const Tuple& t0, const Tuple& t1) const { @@ -108,7 +108,7 @@ int main() std::cout << "\n"; // compute min & max over valid region of the 2d grid - typedef thrust::tuple result_type; + using result_type = thrust::tuple; result_type init(true, FLT_MAX, -FLT_MAX); // initial value transform_tuple unary_op(n, N); // transformation operator diff --git a/thrust/examples/raw_reference_cast.cu b/thrust/examples/raw_reference_cast.cu index 148c9c71a0a..9f36344ba4f 100644 --- a/thrust/examples/raw_reference_cast.cu +++ b/thrust/examples/raw_reference_cast.cu @@ -70,7 +70,7 @@ struct copy_iterators template void print(const std::string& name, const Vector& v) { - typedef typename Vector::value_type T; + using T = typename Vector::value_type; std::cout << name << ": "; thrust::copy(v.begin(), v.end(), std::ostream_iterator(std::cout, " ")); @@ -79,9 +79,9 @@ void print(const std::string& name, const Vector& v) int main() { - typedef thrust::device_vector Vector; - typedef Vector::iterator Iterator; - typedef thrust::device_system_tag System; + using Vector = thrust::device_vector; + using Iterator = Vector::iterator; + using System = thrust::device_system_tag; // allocate device memory Vector A(5); diff --git a/thrust/examples/repeated_range.cu b/thrust/examples/repeated_range.cu index e859ea7d9af..0934744d4cb 100644 --- a/thrust/examples/repeated_range.cu +++ b/thrust/examples/repeated_range.cu @@ -21,7 +21,7 @@ template class repeated_range { public: - typedef typename thrust::iterator_difference::type difference_type; + using difference_type = typename thrust::iterator_difference::type; struct repeat_functor : public thrust::unary_function { @@ -37,12 +37,12 @@ public: } }; - typedef typename thrust::counting_iterator CountingIterator; - typedef typename thrust::transform_iterator TransformIterator; - typedef typename thrust::permutation_iterator PermutationIterator; + using CountingIterator = typename thrust::counting_iterator; + using TransformIterator = typename thrust::transform_iterator; + using PermutationIterator = typename thrust::permutation_iterator; // type of the repeated_range iterator - typedef PermutationIterator iterator; + using iterator = PermutationIterator; // construct repeated_range for the range [first,last) repeated_range(Iterator first, Iterator last, difference_type repeats) @@ -80,7 +80,7 @@ int main() thrust::copy(data.begin(), data.end(), std::ostream_iterator(std::cout, " ")); std::cout << std::endl; - typedef thrust::device_vector::iterator Iterator; + using Iterator = thrust::device_vector::iterator; // create repeated_range with elements repeated twice repeated_range twice(data.begin(), data.end(), 2); diff --git a/thrust/examples/simple_moving_average.cu b/thrust/examples/simple_moving_average.cu index bb251bf06a3..a8efb675083 100644 --- a/thrust/examples/simple_moving_average.cu +++ b/thrust/examples/simple_moving_average.cu @@ -41,7 +41,7 @@ struct minus_and_divide : public thrust::binary_function template void simple_moving_average(const InputVector& data, size_t w, OutputVector& output) { - typedef typename InputVector::value_type T; + using T = typename InputVector::value_type; if (data.size() < w) { diff --git a/thrust/examples/sparse_vector.cu b/thrust/examples/sparse_vector.cu index 10e2b16e67b..928ce47653f 100644 --- a/thrust/examples/sparse_vector.cu +++ b/thrust/examples/sparse_vector.cu @@ -33,8 +33,8 @@ void sum_sparse_vectors( IndexVector3& C_index, ValueVector3& C_value) { - typedef typename IndexVector3::value_type IndexType; - typedef typename ValueVector3::value_type ValueType; + using IndexType = typename IndexVector3::value_type; + using ValueType = typename ValueVector3::value_type; assert(A_index.size() == A_value.size()); assert(B_index.size() == B_value.size()); diff --git a/thrust/examples/stream_compaction.cu b/thrust/examples/stream_compaction.cu index 191ef97ea68..5c63298d5df 100644 --- a/thrust/examples/stream_compaction.cu +++ b/thrust/examples/stream_compaction.cu @@ -23,7 +23,7 @@ struct is_odd : public thrust::unary_function template void print_range(const std::string& name, Iterator first, Iterator last) { - typedef typename std::iterator_traits::value_type T; + using T = typename std::iterator_traits::value_type; std::cout << name << ": "; thrust::copy(first, last, std::ostream_iterator(std::cout, " ")); @@ -36,8 +36,8 @@ int main() size_t N = 10; // define some types - typedef thrust::device_vector Vector; - typedef Vector::iterator Iterator; + using Vector = thrust::device_vector; + using Iterator = Vector::iterator; // allocate storage for array Vector values(N); diff --git a/thrust/examples/strided_range.cu b/thrust/examples/strided_range.cu index 0ef22c17110..6cc6c9782a3 100644 --- a/thrust/examples/strided_range.cu +++ b/thrust/examples/strided_range.cu @@ -21,7 +21,7 @@ template class strided_range { public: - typedef typename thrust::iterator_difference::type difference_type; + using difference_type = typename thrust::iterator_difference::type; struct stride_functor : public thrust::unary_function { @@ -37,12 +37,12 @@ public: } }; - typedef typename thrust::counting_iterator CountingIterator; - typedef typename thrust::transform_iterator TransformIterator; - typedef typename thrust::permutation_iterator PermutationIterator; + using CountingIterator = typename thrust::counting_iterator; + using TransformIterator = typename thrust::transform_iterator; + using PermutationIterator = typename thrust::permutation_iterator; // type of the strided_range iterator - typedef PermutationIterator iterator; + using iterator = PermutationIterator; // construct strided_range for the range [first,last) strided_range(Iterator first, Iterator last, difference_type stride) @@ -84,7 +84,7 @@ int main() thrust::copy(data.begin(), data.end(), std::ostream_iterator(std::cout, " ")); std::cout << std::endl; - typedef thrust::device_vector::iterator Iterator; + using Iterator = thrust::device_vector::iterator; // create strided_range with indices [0,2,4,6] strided_range evens(data.begin(), data.end(), 2); diff --git a/thrust/examples/summary_statistics.cu b/thrust/examples/summary_statistics.cu index d5856851dd8..469501ac1c0 100644 --- a/thrust/examples/summary_statistics.cu +++ b/thrust/examples/summary_statistics.cu @@ -124,7 +124,7 @@ struct summary_stats_binary_op template void print_range(const std::string& name, Iterator first, Iterator last) { - typedef typename std::iterator_traits::value_type T; + using T = typename std::iterator_traits::value_type; std::cout << name << ": "; thrust::copy(first, last, std::ostream_iterator(std::cout, " ")); @@ -133,7 +133,7 @@ void print_range(const std::string& name, Iterator first, Iterator last) int main() { - typedef float T; + using T = float; // initialize host array T h_x[] = {4, 7, 13, 16}; diff --git a/thrust/examples/tiled_range.cu b/thrust/examples/tiled_range.cu index e0d8e9fef72..2fbef66c619 100644 --- a/thrust/examples/tiled_range.cu +++ b/thrust/examples/tiled_range.cu @@ -21,7 +21,7 @@ template class tiled_range { public: - typedef typename thrust::iterator_difference::type difference_type; + using difference_type = typename thrust::iterator_difference::type; struct tile_functor : public thrust::unary_function { @@ -37,12 +37,12 @@ public: } }; - typedef typename thrust::counting_iterator CountingIterator; - typedef typename thrust::transform_iterator TransformIterator; - typedef typename thrust::permutation_iterator PermutationIterator; + using CountingIterator = typename thrust::counting_iterator; + using TransformIterator = typename thrust::transform_iterator; + using PermutationIterator = typename thrust::permutation_iterator; // type of the tiled_range iterator - typedef PermutationIterator iterator; + using iterator = PermutationIterator; // construct repeated_range for the range [first,last) tiled_range(Iterator first, Iterator last, difference_type tiles) @@ -80,7 +80,7 @@ int main() thrust::copy(data.begin(), data.end(), std::ostream_iterator(std::cout, " ")); std::cout << std::endl; - typedef thrust::device_vector::iterator Iterator; + using Iterator = thrust::device_vector::iterator; // create tiled_range with two tiles tiled_range two(data.begin(), data.end(), 2); diff --git a/thrust/examples/transform_iterator.cu b/thrust/examples/transform_iterator.cu index e684105d607..4220d6d92d2 100644 --- a/thrust/examples/transform_iterator.cu +++ b/thrust/examples/transform_iterator.cu @@ -50,7 +50,7 @@ struct simple_negate : public thrust::unary_function template void print_range(const std::string& name, Iterator first, Iterator last) { - typedef typename std::iterator_traits::value_type T; + using T = typename std::iterator_traits::value_type; std::cout << name << ": "; thrust::copy(first, last, std::ostream_iterator(std::cout, " ")); @@ -64,8 +64,8 @@ int main() int hi = 5; // define some types - typedef thrust::device_vector Vector; - typedef Vector::iterator VectorIterator; + using Vector = thrust::device_vector; + using VectorIterator = Vector::iterator; // initialize values Vector values(8); @@ -82,7 +82,7 @@ int main() print_range("values ", values.begin(), values.end()); // define some more types - typedef thrust::transform_iterator, VectorIterator> ClampedVectorIterator; + using ClampedVectorIterator = thrust::transform_iterator, VectorIterator>; // create a transform_iterator that applies clamp() to the values array ClampedVectorIterator cv_begin = thrust::make_transform_iterator(values.begin(), clamp(lo, hi)); @@ -97,8 +97,8 @@ int main() //// // combine transform_iterator with other fancy iterators like counting_iterator - typedef thrust::counting_iterator CountingIterator; - typedef thrust::transform_iterator, CountingIterator> ClampedCountingIterator; + using CountingIterator = thrust::counting_iterator; + using ClampedCountingIterator = thrust::transform_iterator, CountingIterator>; CountingIterator count_begin(0); CountingIterator count_end(10); @@ -112,7 +112,7 @@ int main() //// // combine transform_iterator with another transform_iterator - typedef thrust::transform_iterator, ClampedCountingIterator> NegatedClampedCountingIterator; + using NegatedClampedCountingIterator = thrust::transform_iterator, ClampedCountingIterator>; NegatedClampedCountingIterator ncs_begin = thrust::make_transform_iterator(cs_begin, thrust::negate()); NegatedClampedCountingIterator ncs_end = thrust::make_transform_iterator(cs_end, thrust::negate()); @@ -121,7 +121,7 @@ int main() //// // when a functor does not define result_type, a third template argument must be provided - typedef thrust::transform_iterator, VectorIterator, int> NegatedVectorIterator; + using NegatedVectorIterator = thrust::transform_iterator, VectorIterator, int>; NegatedVectorIterator nv_begin(values.begin(), simple_negate()); NegatedVectorIterator nv_end(values.end(), simple_negate()); diff --git a/thrust/examples/uninitialized_vector.cu b/thrust/examples/uninitialized_vector.cu index d8b9290fb45..3f5a255657c 100644 --- a/thrust/examples/uninitialized_vector.cu +++ b/thrust/examples/uninitialized_vector.cu @@ -38,7 +38,7 @@ struct uninitialized_allocator : thrust::device_allocator template struct rebind { - typedef uninitialized_allocator other; + using other = uninitialized_allocator; }; // note that construct is annotated as @@ -51,7 +51,7 @@ struct uninitialized_allocator : thrust::device_allocator // to make a device_vector which does not initialize its elements, // use uninitialized_allocator as the 2nd template parameter -typedef thrust::device_vector> uninitialized_vector; +using uninitialized_vector = thrust::device_vector>; int main() { diff --git a/thrust/examples/weld_vertices.cu b/thrust/examples/weld_vertices.cu index 813881ea891..ff1bff568c2 100644 --- a/thrust/examples/weld_vertices.cu +++ b/thrust/examples/weld_vertices.cu @@ -34,7 +34,7 @@ */ // define a 2d float vector -typedef thrust::tuple vec2; +using vec2 = thrust::tuple; int main() { diff --git a/thrust/testing/adjacent_difference.cu b/thrust/testing/adjacent_difference.cu index a3a4c98c1fe..7b4473b1434 100644 --- a/thrust/testing/adjacent_difference.cu +++ b/thrust/testing/adjacent_difference.cu @@ -9,7 +9,7 @@ template void TestAdjacentDifferenceSimple() { - typedef typename Vector::value_type T; + using T = typename Vector::value_type; Vector input(4); Vector output(4); diff --git a/thrust/testing/advance.cu b/thrust/testing/advance.cu index 4a13ea3647c..fe7c14f76b9 100644 --- a/thrust/testing/advance.cu +++ b/thrust/testing/advance.cu @@ -8,8 +8,8 @@ template void TestAdvance() { - typedef typename Vector::value_type T; - typedef typename Vector::iterator Iterator; + using T = typename Vector::value_type; + using Iterator = typename Vector::iterator; Vector v(10); thrust::sequence(v.begin(), v.end()); @@ -33,8 +33,8 @@ DECLARE_VECTOR_UNITTEST(TestAdvance); template void TestNext() { - typedef typename Vector::value_type T; - typedef typename Vector::iterator Iterator; + using T = typename Vector::value_type; + using Iterator = typename Vector::iterator; Vector v(10); thrust::sequence(v.begin(), v.end()); @@ -64,8 +64,8 @@ DECLARE_VECTOR_UNITTEST(TestNext); template void TestPrev() { - typedef typename Vector::value_type T; - typedef typename Vector::iterator Iterator; + using T = typename Vector::value_type; + using Iterator = typename Vector::iterator; Vector v(10); thrust::sequence(v.begin(), v.end()); diff --git a/thrust/testing/alignment.cu b/thrust/testing/alignment.cu index 36ae00f0b11..f5d4d3e3675 100644 --- a/thrust/testing/alignment.cu +++ b/thrust/testing/alignment.cu @@ -125,7 +125,7 @@ DECLARE_UNITTEST(test_alignment_of); template void test_aligned_type_instantiation() { - typedef typename thrust::detail::aligned_type::type type; + using type = typename thrust::detail::aligned_type::type; ASSERT_GEQUAL(sizeof(type), 1lu); ASSERT_EQUAL(alignof(type), Align); ASSERT_EQUAL(thrust::detail::alignment_of::value, Align); diff --git a/thrust/testing/allocator.cu b/thrust/testing/allocator.cu index 533ae8cafd5..f76f001c025 100644 --- a/thrust/testing/allocator.cu +++ b/thrust/testing/allocator.cu @@ -112,7 +112,7 @@ struct my_allocator_with_custom_destroy return !(*this == other); } - typedef thrust::detail::true_type is_always_equal; + using is_always_equal = thrust::detail::true_type; // use composition rather than inheritance // to avoid inheriting std::allocator's member @@ -142,12 +142,11 @@ DECLARE_VARIABLE_UNITTEST(TestAllocatorCustomDestroy); template struct my_minimal_allocator { - typedef T value_type; + using value_type = T; - // XXX ideally, we shouldn't require - // these two typedefs - typedef T& reference; - typedef const T& const_reference; + // XXX ideally, we shouldn't require these two aliases + using reference = T&; + using const_reference = const T&; _CCCL_HOST my_minimal_allocator() {} diff --git a/thrust/testing/allocator_aware_policies.cu b/thrust/testing/allocator_aware_policies.cu index fbfb6ae0127..f85facf9325 100644 --- a/thrust/testing/allocator_aware_policies.cu +++ b/thrust/testing/allocator_aware_policies.cu @@ -32,12 +32,12 @@ struct test_memory_resource_t final : thrust::mr::memory_resource<> template class CRTPBase> struct policy_info { - typedef Policy policy; + using policy = Policy; template