From c246aa2160cb831b3bfd5082e0c22d93314b2acc Mon Sep 17 00:00:00 2001 From: Victor Chernyakin Date: Thu, 2 Oct 2025 17:53:39 -0700 Subject: [PATCH 1/2] remove unnecessary `typename` before dependent names --- examples/benchmark/fibonacci.cpp | 2 +- examples/nvexec/maxwell/snr.cuh | 24 +++++++-------- include/asioexec/as_default_on.hpp | 5 ++-- include/asioexec/use_sender.hpp | 2 +- include/exec/__detail/__basic_sequence.hpp | 2 +- include/exec/__detail/__bwos_lifo_queue.hpp | 10 +++---- include/exec/any_sender_of.hpp | 29 +++++++++---------- include/exec/async_scope.hpp | 2 +- include/exec/fork_join.hpp | 2 +- include/exec/just_from.hpp | 2 +- include/exec/libdispatch_queue.hpp | 2 +- include/exec/sequence/any_sequence_of.hpp | 20 ++++++------- include/exec/sequence_senders.hpp | 2 +- include/exec/static_thread_pool.hpp | 2 +- include/exec/system_context.hpp | 4 +-- include/exec/task.hpp | 7 ++--- include/exec/timed_scheduler.hpp | 4 +-- include/exec/timed_thread_scheduler.hpp | 9 +++--- include/exec/windows/windows_thread_pool.hpp | 14 ++++----- include/execpools/thread_pool_base.hpp | 4 +-- include/nvexec/detail/variant.cuh | 2 +- include/nvexec/nvtx.cuh | 2 +- include/nvexec/stream/algorithm_base.cuh | 4 +-- include/nvexec/stream/bulk.cuh | 2 +- include/nvexec/stream/continues_on.cuh | 2 +- include/nvexec/stream/launch.cuh | 2 +- include/nvexec/stream/let_xxx.cuh | 4 +-- include/nvexec/stream/reduce.cuh | 4 +-- include/nvexec/stream/schedule_from.cuh | 2 +- include/nvexec/stream/start_detached.cuh | 4 +-- include/nvexec/stream/then.cuh | 4 +-- include/nvexec/stream/upon_error.cuh | 4 +-- include/nvexec/stream/upon_stopped.cuh | 2 +- include/stdexec/__detail/__basic_sender.hpp | 20 ++++++------- include/stdexec/__detail/__cpo.hpp | 4 +-- include/stdexec/__detail/__debug.hpp | 2 +- include/stdexec/__detail/__intrusive_ptr.hpp | 6 ++-- include/stdexec/__detail/__just.hpp | 2 +- include/stdexec/__detail/__let.hpp | 4 +-- include/stdexec/__detail/__meta.hpp | 22 +++++++------- include/stdexec/__detail/__ranges.hpp | 2 +- include/stdexec/__detail/__read_env.hpp | 4 +-- .../__detail/__sender_introspection.hpp | 4 +-- include/stdexec/__detail/__senders.hpp | 2 +- include/stdexec/__detail/__start_detached.hpp | 5 ++-- include/stdexec/__detail/__stop_token.hpp | 2 +- include/stdexec/__detail/__sync_wait.hpp | 2 +- .../__transform_completion_signatures.hpp | 5 ++-- include/stdexec/__detail/__type_traits.hpp | 6 ++-- include/stdexec/__detail/__utility.hpp | 2 +- include/stdexec/__detail/__when_all.hpp | 4 +-- test/exec/test_any_sender.cpp | 5 ++-- .../algos/adaptors/test_schedule_from.cpp | 2 +- test/test_common/senders.hpp | 2 +- 54 files changed, 143 insertions(+), 150 deletions(-) diff --git a/examples/benchmark/fibonacci.cpp b/examples/benchmark/fibonacci.cpp index f1bae78e7..7aa11bd29 100644 --- a/examples/benchmark/fibonacci.cpp +++ b/examples/benchmark/fibonacci.cpp @@ -29,7 +29,7 @@ auto serial_fib(long n) -> long { template using any_sender_of = - typename exec::any_receiver_ref>::template any_sender<>; + exec::any_receiver_ref>::template any_sender<>; using fib_sender = any_sender_of; diff --git a/examples/nvexec/maxwell/snr.cuh b/examples/nvexec/maxwell/snr.cuh index 00883328b..14b50a21b 100644 --- a/examples/nvexec/maxwell/snr.cuh +++ b/examples/nvexec/maxwell/snr.cuh @@ -61,14 +61,14 @@ namespace ex = stdexec; namespace nvexec::_strm::repeat_n { template class receiver_2_t : public stream_receiver_base { - using Sender = typename OpT::PredSender; - using Receiver = typename OpT::Receiver; + using Sender = OpT::PredSender; + using Receiver = OpT::Receiver; OpT& op_state_; public: void set_value() noexcept { - using inner_op_state_t = typename OpT::inner_op_state_t; + using inner_op_state_t = OpT::inner_op_state_t; op_state_.i_++; @@ -95,7 +95,7 @@ namespace nvexec::_strm::repeat_n { op_state_.propagate_completion_signal(set_stopped_t()); } - auto get_env() const noexcept -> typename OpT::env_t { + auto get_env() const noexcept -> OpT::env_t { return op_state_.make_env(); } @@ -106,13 +106,13 @@ namespace nvexec::_strm::repeat_n { template class receiver_1_t : public stream_receiver_base { - using Receiver = typename OpT::Receiver; + using Receiver = OpT::Receiver; OpT& op_state_; public: void set_value() noexcept { - using inner_op_state_t = typename OpT::inner_op_state_t; + using inner_op_state_t = OpT::inner_op_state_t; if (op_state_.n_) { auto sch = ex::get_scheduler(ex::get_env(op_state_.rcvr_)); @@ -137,7 +137,7 @@ namespace nvexec::_strm::repeat_n { op_state_.propagate_completion_signal(set_stopped_t()); } - auto get_env() const noexcept -> typename OpT::env_t { + auto get_env() const noexcept -> OpT::env_t { return op_state_.make_env(); } @@ -196,8 +196,8 @@ namespace repeat_n_detail { template class receiver_2_t { - using Sender = typename OpT::PredSender; - using Receiver = typename OpT::Receiver; + using Sender = OpT::PredSender; + using Receiver = OpT::Receiver; OpT& op_state_; @@ -205,7 +205,7 @@ namespace repeat_n_detail { using receiver_concept = ex::receiver_t; void set_value() noexcept { - using inner_op_state_t = typename OpT::inner_op_state_t; + using inner_op_state_t = OpT::inner_op_state_t; op_state_.i_++; @@ -244,7 +244,7 @@ namespace repeat_n_detail { template class receiver_1_t { - using Receiver = typename OpT::Receiver; + using Receiver = OpT::Receiver; OpT& op_state_; @@ -252,7 +252,7 @@ namespace repeat_n_detail { using receiver_concept = ex::receiver_t; void set_value() noexcept { - using inner_op_state_t = typename OpT::inner_op_state_t; + using inner_op_state_t = OpT::inner_op_state_t; if (op_state_.n_) { auto sch = ex::get_scheduler(ex::get_env(op_state_.rcvr_)); diff --git a/include/asioexec/as_default_on.hpp b/include/asioexec/as_default_on.hpp index a9f8fa7ab..75e40de61 100644 --- a/include/asioexec/as_default_on.hpp +++ b/include/asioexec/as_default_on.hpp @@ -27,9 +27,10 @@ namespace asioexec { template using as_default_on_t = - typename std::remove_cvref_t::template rebind_executor::template rebind_executor().get_executor())>, - CompletionToken>>::other; + CompletionToken + >>::other; namespace detail::as_default_on { diff --git a/include/asioexec/use_sender.hpp b/include/asioexec/use_sender.hpp index 90801e4d9..0ae7c148b 100644 --- a/include/asioexec/use_sender.hpp +++ b/include/asioexec/use_sender.hpp @@ -139,7 +139,7 @@ namespace asioexec { }; template - using transform_set_value_t = typename transform_set_value::type; + using transform_set_value_t = transform_set_value::type; template using completion_signatures = ::stdexec::transform_completion_signatures< diff --git a/include/exec/__detail/__basic_sequence.hpp b/include/exec/__detail/__basic_sequence.hpp index ff91f1096..49430e0b8 100644 --- a/include/exec/__detail/__basic_sequence.hpp +++ b/include/exec/__detail/__basic_sequence.hpp @@ -37,7 +37,7 @@ namespace exec { using __t = __seqexpr; using __id = __seqexpr; using __desc_t = decltype(_DescriptorFn()); - using __tag_t = typename __desc_t::__tag; + using __tag_t = __desc_t::__tag; using __captures_t = stdexec::__minvoke<__desc_t, stdexec::__q>; diff --git a/include/exec/__detail/__bwos_lifo_queue.hpp b/include/exec/__detail/__bwos_lifo_queue.hpp index f0d8b5bba..0262acb64 100644 --- a/include/exec/__detail/__bwos_lifo_queue.hpp +++ b/include/exec/__detail/__bwos_lifo_queue.hpp @@ -84,7 +84,7 @@ namespace exec::bwos { private: template - using allocator_of_t = typename std::allocator_traits::template rebind_alloc; + using allocator_of_t = std::allocator_traits::template rebind_alloc; struct block_type { explicit block_type(std::size_t block_size, Allocator allocator = Allocator()); @@ -319,8 +319,8 @@ namespace exec::bwos { } template - auto lifo_queue::block_type::operator=(const block_type &other) -> - typename lifo_queue::block_type & { + auto lifo_queue::block_type::operator=(const block_type &other) + -> lifo_queue::block_type & { head_.store(other.head_.load(std::memory_order_relaxed), std::memory_order_relaxed); tail_.store(other.tail_.load(std::memory_order_relaxed), std::memory_order_relaxed); steal_tail_.store(other.steal_tail_.load(std::memory_order_relaxed), std::memory_order_relaxed); @@ -339,8 +339,8 @@ namespace exec::bwos { } template - auto lifo_queue::block_type::operator=(block_type &&other) noexcept -> - typename lifo_queue::block_type & { + auto lifo_queue::block_type::operator=(block_type &&other) noexcept + -> lifo_queue::block_type & { head_.store(other.head_.load(std::memory_order_relaxed), std::memory_order_relaxed); tail_.store(other.tail_.load(std::memory_order_relaxed), std::memory_order_relaxed); steal_tail_.store(other.steal_tail_.load(std::memory_order_relaxed), std::memory_order_relaxed); diff --git a/include/exec/any_sender_of.hpp b/include/exec/any_sender_of.hpp index 21912bd0a..a9a2c4934 100644 --- a/include/exec/any_sender_of.hpp +++ b/include/exec/any_sender_of.hpp @@ -333,7 +333,7 @@ namespace exec { void __construct_small(_As&&... __args) { static_assert(sizeof(_Tp) <= __buffer_size && alignof(_Tp) <= __alignment); _Tp* __pointer = reinterpret_cast<_Tp*>(&__buffer_[0]); - using _Alloc = typename std::allocator_traits<_Allocator>::template rebind_alloc<_Tp>; + using _Alloc = std::allocator_traits<_Allocator>::template rebind_alloc<_Tp>; _Alloc __alloc{__allocator_}; std::allocator_traits<_Alloc>::construct( __alloc, __pointer, static_cast<_As&&>(__args)...); @@ -342,7 +342,7 @@ namespace exec { template void __construct_large(_As&&... __args) { - using _Alloc = typename std::allocator_traits<_Allocator>::template rebind_alloc<_Tp>; + using _Alloc = std::allocator_traits<_Allocator>::template rebind_alloc<_Tp>; _Alloc __alloc{__allocator_}; _Tp* __pointer = std::allocator_traits<_Alloc>::allocate(__alloc, 1); STDEXEC_TRY { @@ -361,7 +361,7 @@ namespace exec { if (!__self.__object_pointer_) { return; } - using _Alloc = typename std::allocator_traits<_Allocator>::template rebind_alloc<_Tp>; + using _Alloc = std::allocator_traits<_Allocator>::template rebind_alloc<_Tp>; _Alloc __alloc{__self.__allocator_}; _Tp* __pointer = static_cast<_Tp*>(std::exchange(__self.__object_pointer_, nullptr)); std::allocator_traits<_Alloc>::destroy(__alloc, __pointer); @@ -500,7 +500,7 @@ namespace exec { void __construct_small(_As&&... __args) { static_assert(sizeof(_Tp) <= __buffer_size && alignof(_Tp) <= __alignment); _Tp* __pointer = reinterpret_cast<_Tp*>(&__buffer_[0]); - using _Alloc = typename std::allocator_traits<_Allocator>::template rebind_alloc<_Tp>; + using _Alloc = std::allocator_traits<_Allocator>::template rebind_alloc<_Tp>; _Alloc __alloc{__allocator_}; std::allocator_traits<_Alloc>::construct(__alloc, __pointer, static_cast<_As&&>(__args)...); __object_pointer_ = __pointer; @@ -508,7 +508,7 @@ namespace exec { template void __construct_large(_As&&... __args) { - using _Alloc = typename std::allocator_traits<_Allocator>::template rebind_alloc<_Tp>; + using _Alloc = std::allocator_traits<_Allocator>::template rebind_alloc<_Tp>; _Alloc __alloc{__allocator_}; _Tp* __pointer = std::allocator_traits<_Alloc>::allocate(__alloc, 1); STDEXEC_TRY { @@ -527,7 +527,7 @@ namespace exec { if (!__self.__object_pointer_) { return; } - using _Alloc = typename std::allocator_traits<_Allocator>::template rebind_alloc<_Tp>; + using _Alloc = std::allocator_traits<_Allocator>::template rebind_alloc<_Tp>; _Alloc __alloc{__self.__allocator_}; _Tp* __pointer = static_cast<_Tp*>(std::exchange(__self.__object_pointer_, nullptr)); std::allocator_traits<_Alloc>::destroy(__alloc, __pointer); @@ -546,7 +546,7 @@ namespace exec { if constexpr (__is_small<_Tp>) { _Tp& __other_object = *__pointer; __self.template __construct_small<_Tp>(static_cast<_Tp&&>(__other_object)); - using _Alloc = typename std::allocator_traits<_Allocator>::template rebind_alloc<_Tp>; + using _Alloc = std::allocator_traits<_Allocator>::template rebind_alloc<_Tp>; _Alloc __alloc{__self.__allocator_}; std::allocator_traits<_Alloc>::destroy(__alloc, __pointer); } else { @@ -873,9 +873,8 @@ namespace exec { struct __operation_base { STDEXEC_ATTRIBUTE(no_unique_address) _Receiver __rcvr_; stdexec::inplace_stop_source __stop_source_{}; - using __stop_callback = typename stdexec::stop_token_of_t< - stdexec::env_of_t<_Receiver> - >::template callback_type<__on_stop_t>; + using __stop_callback = + stdexec::stop_token_of_t>::template callback_type<__on_stop_t>; std::optional<__stop_callback> __on_stop_{}; }; @@ -1250,9 +1249,9 @@ namespace exec { } template _Self, class... _Env> - requires(__any::__satisfies_receiver_query && ...) - static auto get_completion_signatures(_Self&&, _Env&&...) noexcept -> - typename __sender_base::completion_signatures { + requires(__any::__satisfies_receiver_query && ...) + static auto get_completion_signatures(_Self&&, _Env&&...) noexcept + -> __sender_base::completion_signatures { return {}; } @@ -1298,10 +1297,10 @@ namespace exec { stdexec::get_completion_scheduler.signature; template using __schedule_sender_fn = - typename __schedule_receiver::template any_sender<__any_scheduler_noexcept_signature>; + __schedule_receiver::template any_sender<__any_scheduler_noexcept_signature>; #else template - using __schedule_sender_fn = typename __schedule_receiver::template any_sender< + using __schedule_sender_fn = __schedule_receiver::template any_sender< stdexec::get_completion_scheduler.template signature >; #endif diff --git a/include/exec/async_scope.hpp b/include/exec/async_scope.hpp index 9328c9d60..f6f48aab6 100644 --- a/include/exec/async_scope.hpp +++ b/include/exec/async_scope.hpp @@ -311,7 +311,7 @@ namespace exec { class __t : __subscription { using __forward_consumer = - typename stop_token_of_t>::template callback_type<__forward_stopped>; + stop_token_of_t>::template callback_type<__forward_stopped>; void __complete_() noexcept { STDEXEC_TRY { diff --git a/include/exec/fork_join.hpp b/include/exec/fork_join.hpp index 7097d6099..878a7dfd4 100644 --- a/include/exec/fork_join.hpp +++ b/include/exec/fork_join.hpp @@ -59,7 +59,7 @@ namespace exec { >; template - using _variant_t = typename stdexec::__mset_insert< + using _variant_t = stdexec::__mset_insert< stdexec::__for_each_completion_signature< Completions, stdexec::__decayed_tuple, diff --git a/include/exec/just_from.hpp b/include/exec/just_from.hpp index 091d83536..af94f4e66 100644 --- a/include/exec/just_from.hpp +++ b/include/exec/just_from.hpp @@ -153,7 +153,7 @@ namespace exec { }; template - using _sndr = typename Tag::template _sndr; + using _sndr = Tag::template _sndr; public: template diff --git a/include/exec/libdispatch_queue.hpp b/include/exec/libdispatch_queue.hpp index 43455f0d1..22604551e 100644 --- a/include/exec/libdispatch_queue.hpp +++ b/include/exec/libdispatch_queue.hpp @@ -420,7 +420,7 @@ namespace exec { libdispatch_queue &queue_; void enqueue() noexcept { - using bulk_task = typename shared_state::bulk_task; + using bulk_task = shared_state::bulk_task; shared_state_.tasks_.reserve(static_cast(shared_state_.shape_)); for (Shape i{}; i != shared_state_.shape_; ++i) { shared_state_.tasks_.push_back(bulk_task(&shared_state_, i)); diff --git a/include/exec/sequence/any_sequence_of.hpp b/include/exec/sequence/any_sequence_of.hpp index 9f677d46e..d981a94cb 100644 --- a/include/exec/sequence/any_sequence_of.hpp +++ b/include/exec/sequence/any_sequence_of.hpp @@ -27,18 +27,18 @@ namespace exec { template <__valid_completion_signatures _Sigs> struct __rcvr_next_vfun { using __return_sigs = completion_signatures; - using __void_sender = typename any_receiver_ref<__return_sigs>::template any_sender<>; - using __item_sender = typename any_receiver_ref<_Sigs>::template any_sender<>; + using __void_sender = any_receiver_ref<__return_sigs>::template any_sender<>; + using __item_sender = any_receiver_ref<_Sigs>::template any_sender<>; __void_sender (*__fn_)(void*, __item_sender&&) noexcept; }; template struct __rcvr_next_vfun_fn { using __return_sigs = completion_signatures; - using __void_sender = typename any_receiver_ref<__return_sigs>::template any_sender<>; + using __void_sender = any_receiver_ref<__return_sigs>::template any_sender<>; template - using __item_sender = typename any_receiver_ref<_Sigs>::template any_sender<>; + using __item_sender = any_receiver_ref<_Sigs>::template any_sender<>; template <__valid_completion_signatures _Sigs> constexpr auto @@ -55,7 +55,7 @@ namespace exec { template struct __next_vtable<_NextSigs, completion_signatures<_Sigs...>, _Queries...> { - using __item_sender = typename any_receiver_ref<_NextSigs>::template any_sender<>; + using __item_sender = any_receiver_ref<_NextSigs>::template any_sender<>; using __item_types = item_types<__item_sender>; struct __t @@ -108,10 +108,10 @@ namespace exec { struct __receiver_ref, _Queries...> { struct __t { using __return_sigs = completion_signatures; - using __void_sender = typename any_receiver_ref<__return_sigs>::template any_sender<>; + using __void_sender = any_receiver_ref<__return_sigs>::template any_sender<>; using __next_sigs = completion_signatures<_Sigs...>; using __sigs = __to_sequence_completions_t<__next_sigs>; - using __item_sender = typename any_receiver_ref<__next_sigs>::template any_sender<>; + using __item_sender = any_receiver_ref<__next_sigs>::template any_sender<>; using __item_types = item_types<__item_sender>; using __vtable_t = stdexec::__t<__next_vtable<__next_sigs, __sigs, _Queries...>>; @@ -233,7 +233,7 @@ namespace exec { using __vtable_t = stdexec::__t<__sender_vtable<_Sigs, _SenderQueries, _ReceiverQueries>>; using __sigs = __to_sequence_completions_t<_Sigs>; - using __item_sender = typename any_receiver_ref<_Sigs>::template any_sender<>; + using __item_sender = any_receiver_ref<_Sigs>::template any_sender<>; class __t { public: @@ -343,8 +343,8 @@ namespace exec { using __id = any_sender; using __t = any_sender; using sender_concept = sequence_sender_t; - using completion_signatures = typename __sender_base::completion_signatures; - using item_types = typename __sender_base::item_types; + using completion_signatures = __sender_base::completion_signatures; + using item_types = __sender_base::item_types; template _Sender> requires stdexec::sender_in<_Sender, __env_t> && sequence_sender_to<_Sender, __receiver_base> diff --git a/include/exec/sequence_senders.hpp b/include/exec/sequence_senders.hpp index 3f12e1305..aa8f2eff0 100644 --- a/include/exec/sequence_senders.hpp +++ b/include/exec/sequence_senders.hpp @@ -154,7 +154,7 @@ namespace exec { concept __with_tag_invoke = tag_invocable, _Env>; template - using __member_alias_t = typename __decay_t<__tfx_sender<_Sender, _Env>>::item_types; + using __member_alias_t = __decay_t<__tfx_sender<_Sender, _Env>>::item_types; template concept __with_member_alias = __mvalid<__member_alias_t, _Sender, _Env>; diff --git a/include/exec/static_thread_pool.hpp b/include/exec/static_thread_pool.hpp index 66c9d2abc..b5a3872aa 100644 --- a/include/exec/static_thread_pool.hpp +++ b/include/exec/static_thread_pool.hpp @@ -1577,7 +1577,7 @@ namespace exec { using NextReceiver = stdexec::__t>; using ItemOperation = connect_result_t; - using ItemAllocator = typename std::allocator_traits::template rebind_alloc< + using ItemAllocator = std::allocator_traits::template rebind_alloc< stdexec::__manual_lifetime >; diff --git a/include/exec/system_context.hpp b/include/exec/system_context.hpp index e316f3393..86ce97a6f 100644 --- a/include/exec/system_context.hpp +++ b/include/exec/system_context.hpp @@ -324,7 +324,7 @@ namespace exec { template struct __typed_forward_args_receiver : __forward_args_receiver<_Previous> { using __base_t = __forward_args_receiver<_Previous>; - using __rcvr_t = typename _BulkState::__rcvr_t; + using __rcvr_t = _BulkState::__rcvr_t; /// Stores `__as` in the base class storage, with the right types. explicit __typed_forward_args_receiver(_As&&... __as) { @@ -617,7 +617,7 @@ namespace exec { -> __detail::__system_bulk_op<_IsUnchunked, _Previous, _Size, _Fn, _Rcvr, _Parallelize> { using __res_t = __detail::__system_bulk_op<_IsUnchunked, _Previous, _Size, _Fn, _Rcvr, _Parallelize>; - using __receiver_t = typename __res_t::__intermediate_receiver_t; + using __receiver_t = __res_t::__intermediate_receiver_t; return {std::move(*this), std::move(__rcvr), [this](auto& __op) { // Connect bulk input receiver with the previous operation and store in the operating state. return stdexec::connect( diff --git a/include/exec/task.hpp b/include/exec/task.hpp index 956e86b54..9eb73c738 100644 --- a/include/exec/task.hpp +++ b/include/exec/task.hpp @@ -169,8 +169,7 @@ namespace exec { template <__indirect_stop_token_provider _ParentPromise> struct __default_awaiter_context<_ParentPromise> { using __stop_token_t = stop_token_of_t>; - using __stop_callback_t = - typename __stop_token_t::template callback_type<__forward_stop_request>; + using __stop_callback_t = __stop_token_t::template callback_type<__forward_stop_request>; template <__scheduler_affinity _Affinity> explicit __default_awaiter_context( @@ -254,7 +253,7 @@ namespace exec { template using awaiter_context_t = - typename __decay_t>::template awaiter_context_t<_Promise, _ParentPromise>; + __decay_t>::template awaiter_context_t<_Promise, _ParentPromise>; //////////////////////////////////////////////////////////////////////////////// // In a base class so it can be specialized when _Ty is void: @@ -352,7 +351,7 @@ namespace exec { } }; - using __promise_context_t = typename _Context::template promise_context_t<__promise>; + using __promise_context_t = _Context::template promise_context_t<__promise>; struct __promise : __promise_base<_Ty> diff --git a/include/exec/timed_scheduler.hpp b/include/exec/timed_scheduler.hpp index f602c948a..68bf9502e 100644 --- a/include/exec/timed_scheduler.hpp +++ b/include/exec/timed_scheduler.hpp @@ -26,7 +26,7 @@ namespace exec { template concept time_point = regular<_Tp> && totally_ordered<_Tp> - && requires(_Tp __tp, const _Tp __ctp, typename _Tp::duration __dur) { + && requires(_Tp __tp, const _Tp __ctp, _Tp::duration __dur) { { __ctp + __dur } -> same_as<_Tp>; { __dur + __ctp } -> same_as<_Tp>; { __ctp - __dur } -> same_as<_Tp>; @@ -71,7 +71,7 @@ namespace exec { using time_point_of_t = decltype(now(stdexec::__declval<_TimedScheduler>())); template <__timed_scheduler _TimedScheduler> - using duration_of_t = typename stdexec::__decay_t>::duration; + using duration_of_t = stdexec::__decay_t>::duration; namespace __schedule_after { struct __schedule_after_base_t; diff --git a/include/exec/timed_thread_scheduler.hpp b/include/exec/timed_thread_scheduler.hpp index 540782c86..6e13c99c6 100644 --- a/include/exec/timed_thread_scheduler.hpp +++ b/include/exec/timed_thread_scheduler.hpp @@ -291,9 +291,8 @@ namespace exec { } }; - using callback_type = typename stdexec::stop_token_of_t< - stdexec::env_of_t - >::template callback_type; + using callback_type = + stdexec::stop_token_of_t>::template callback_type; void request_stop() noexcept { if (ref_count_.fetch_add(1, std::memory_order_relaxed) == 1) { @@ -335,8 +334,8 @@ namespace exec { } template - auto connect(Receiver receiver) const & noexcept -> - typename _time_thrd_sched::timed_thread_schedule_at_op::__t { + auto connect(Receiver receiver) const & noexcept + -> _time_thrd_sched::timed_thread_schedule_at_op::__t { return {*context_, time_point_, std::move(receiver)}; } diff --git a/include/exec/windows/windows_thread_pool.hpp b/include/exec/windows/windows_thread_pool.hpp index 2241428b0..34118b7d2 100644 --- a/include/exec/windows/windows_thread_pool.hpp +++ b/include/exec/windows/windows_thread_pool.hpp @@ -49,7 +49,7 @@ namespace exec::__win32 { class type; }; template - using schedule_op = typename _schedule_op::type; + using schedule_op = _schedule_op::type; template struct _cancellable_schedule_op_base { @@ -57,7 +57,7 @@ namespace exec::__win32 { using __t = type; }; template - using cancellable_schedule_op_base = typename _cancellable_schedule_op_base::type; + using cancellable_schedule_op_base = _cancellable_schedule_op_base::type; template struct _cancellable_schedule_op { @@ -65,7 +65,7 @@ namespace exec::__win32 { using __t = type; }; template - using cancellable_schedule_op = typename _cancellable_schedule_op::type; + using cancellable_schedule_op = _cancellable_schedule_op::type; template struct _time_schedule_op { @@ -73,7 +73,7 @@ namespace exec::__win32 { using __t = type; }; template - using time_schedule_op = typename _time_schedule_op::type; + using time_schedule_op = _time_schedule_op::type; template struct _schedule_at_op { @@ -81,7 +81,7 @@ namespace exec::__win32 { using __t = type; }; template - using schedule_at_op = typename _schedule_at_op::type; + using schedule_at_op = _schedule_at_op::type; template struct _schedule_after_op { @@ -89,7 +89,7 @@ namespace exec::__win32 { using __t = type; }; template - using schedule_after_op = typename _schedule_after_op::type; + using schedule_after_op = _schedule_after_op::type; class schedule_at_sender; @@ -99,7 +99,7 @@ namespace exec::__win32 { using __t = sender; }; template - using schedule_after_sender = typename _schedule_after::sender; + using schedule_after_sender = _schedule_after::sender; using clock_type = filetime_clock; diff --git a/include/execpools/thread_pool_base.hpp b/include/execpools/thread_pool_base.hpp index df63e1922..3b7d17bc5 100644 --- a/include/execpools/thread_pool_base.hpp +++ b/include/execpools/thread_pool_base.hpp @@ -57,8 +57,8 @@ namespace execpools { stdexec::completion_signatures; template - auto query(stdexec::get_completion_scheduler_t) const noexcept -> - typename DerivedPoolType::scheduler { + auto query(stdexec::get_completion_scheduler_t) const noexcept + -> DerivedPoolType::scheduler { return pool_.get_scheduler(); } diff --git a/include/nvexec/detail/variant.cuh b/include/nvexec/detail/variant.cuh index 5ed692736..55d4ea820 100644 --- a/include/nvexec/detail/variant.cuh +++ b/include/nvexec/detail/variant.cuh @@ -46,7 +46,7 @@ namespace nvexec { template requires(sizeof...(As) > 0) - using front = typename front_::type; + using front = front_::type; template constexpr auto variadic_max(Ts... as) -> std::size_t { diff --git a/include/nvexec/nvtx.cuh b/include/nvexec/nvtx.cuh index c1baf7847..986de584b 100644 --- a/include/nvexec/nvtx.cuh +++ b/include/nvexec/nvtx.cuh @@ -42,7 +42,7 @@ namespace nvexec { struct receiver_t { class __t : public stream_receiver_base { using Receiver = stdexec::__t; - using Env = typename operation_state_base_t::env_t; + using Env = operation_state_base_t::env_t; operation_state_base_t& op_state_; std::string name_; diff --git a/include/nvexec/stream/algorithm_base.cuh b/include/nvexec/stream/algorithm_base.cuh index b070ce71f..1759c6233 100644 --- a/include/nvexec/stream/algorithm_base.cuh +++ b/include/nvexec/stream/algorithm_base.cuh @@ -107,10 +107,10 @@ namespace nvexec::_strm::__algo_range_init_fun { using __id = sender_t; template - using receiver_t = typename DerivedSender::template receiver_t; + using receiver_t = DerivedSender::template receiver_t; template - using _set_value_t = typename DerivedSender::template _set_value_t; + using _set_value_t = DerivedSender::template _set_value_t; Sender sndr_; STDEXEC_ATTRIBUTE(no_unique_address) InitT init_; diff --git a/include/nvexec/stream/bulk.cuh b/include/nvexec/stream/bulk.cuh index 67793e629..e0c0048d4 100644 --- a/include/nvexec/stream/bulk.cuh +++ b/include/nvexec/stream/bulk.cuh @@ -49,7 +49,7 @@ namespace nvexec::_strm { struct receiver_t { class __t : public stream_receiver_base { using Receiver = stdexec::__t; - using Env = typename operation_state_base_t::env_t; + using Env = operation_state_base_t::env_t; Shape shape_; Fun f_; diff --git a/include/nvexec/stream/continues_on.cuh b/include/nvexec/stream/continues_on.cuh index 3819c3a2f..dace20d4f 100644 --- a/include/nvexec/stream/continues_on.cuh +++ b/include/nvexec/stream/continues_on.cuh @@ -32,7 +32,7 @@ namespace nvexec::_strm { struct operation_state_t { using Sender = __cvref_t; using Receiver = stdexec::__t; - using Env = typename operation_state_base_t::env_t; + using Env = operation_state_base_t::env_t; struct __t : operation_state_base_t { using __id = operation_state_t; diff --git a/include/nvexec/stream/launch.cuh b/include/nvexec/stream/launch.cuh index 8e1e757a7..92978cc34 100644 --- a/include/nvexec/stream/launch.cuh +++ b/include/nvexec/stream/launch.cuh @@ -84,7 +84,7 @@ namespace nvexec { } [[nodiscard]] - auto get_env() const noexcept -> typename operation_state_base_t::env_t { + auto get_env() const noexcept -> operation_state_base_t::env_t { return op_state_.make_env(); } diff --git a/include/nvexec/stream/let_xxx.cuh b/include/nvexec/stream/let_xxx.cuh index 7e0eeece1..556be04bf 100644 --- a/include/nvexec/stream/let_xxx.cuh +++ b/include/nvexec/stream/let_xxx.cuh @@ -102,7 +102,7 @@ namespace nvexec::_strm { using Sender = stdexec::__t; using Receiver = stdexec::__t; using PropagateReceiver = stdexec::__t>; - using Env = typename operation_state_base_t::env_t; + using Env = operation_state_base_t::env_t; struct __t : public stream_receiver_base { using __id = _receiver_; @@ -192,7 +192,7 @@ namespace nvexec::_strm { using Sender = stdexec::__t; using Receiver = stdexec::__t; using _receiver_t = __receiver; - using op_state_variant_t = typename _receiver_t::op_state_variant_t; + using op_state_variant_t = _receiver_t::op_state_variant_t; template operation(Sender&& sndr, Receiver2&& rcvr, Fun fun) diff --git a/include/nvexec/stream/reduce.cuh b/include/nvexec/stream/reduce.cuh index 52da3b831..7f0643e45 100644 --- a/include/nvexec/stream/reduce.cuh +++ b/include/nvexec/stream/reduce.cuh @@ -52,10 +52,10 @@ namespace nvexec { >; template - using result_t = typename __algo_range_init_fun::binary_invoke_result_t; + using result_t = __algo_range_init_fun::binary_invoke_result_t; template - static void set_value_impl(typename base::__t&& self, Range&& range) noexcept { + static void set_value_impl(base::__t&& self, Range&& range) noexcept { cudaError_t status{cudaSuccess}; cudaStream_t stream = self.op_state_.get_stream(); diff --git a/include/nvexec/stream/schedule_from.cuh b/include/nvexec/stream/schedule_from.cuh index f436e0ec5..bf0ff1bbc 100644 --- a/include/nvexec/stream/schedule_from.cuh +++ b/include/nvexec/stream/schedule_from.cuh @@ -44,7 +44,7 @@ namespace nvexec::_strm { struct receiver_t { using Sender = __cvref_t; using Receiver = stdexec::__t; - using Env = typename operation_state_base_t::env_t; + using Env = operation_state_base_t::env_t; struct __t : stream_receiver_base { using __id = receiver_t; diff --git a/include/nvexec/stream/start_detached.cuh b/include/nvexec/stream/start_detached.cuh index 3e42a5d82..814b07e93 100644 --- a/include/nvexec/stream/start_detached.cuh +++ b/include/nvexec/stream/start_detached.cuh @@ -79,7 +79,7 @@ namespace nvexec::_strm { if constexpr (__callable) { auto alloc = stdexec::get_allocator(self->env_); using Alloc = decltype(alloc); - using OpAlloc = typename std::allocator_traits::template rebind_alloc; + using OpAlloc = std::allocator_traits::template rebind_alloc; OpAlloc op_alloc{alloc}; std::allocator_traits::destroy(op_alloc, self); std::allocator_traits::deallocate(op_alloc, self, 1); @@ -149,7 +149,7 @@ namespace nvexec::_strm { // Use the provided allocator to allocate the operation state. auto alloc = get_allocator(env); using Alloc = decltype(alloc); - using OpAlloc = typename std::allocator_traits::template rebind_alloc; + using OpAlloc = std::allocator_traits::template rebind_alloc; // We use the allocator to allocate the operation state and also to construct it. OpAlloc op_alloc{alloc}; Op* op = std::allocator_traits::allocate(op_alloc, 1); diff --git a/include/nvexec/stream/then.cuh b/include/nvexec/stream/then.cuh index 49cd9352b..aec83d173 100644 --- a/include/nvexec/stream/then.cuh +++ b/include/nvexec/stream/then.cuh @@ -102,7 +102,7 @@ namespace nvexec::_strm { op_state_.propagate_completion_signal(set_stopped_t()); } - auto get_env() const noexcept -> typename operation_state_base_t::env_t { + auto get_env() const noexcept -> operation_state_base_t::env_t { return op_state_.make_env(); } @@ -136,7 +136,7 @@ namespace nvexec::_strm { template struct result_size_for { - using __t = typename size_of_<__call_result_t>::__t; + using __t = size_of_<__call_result_t>::__t; }; template diff --git a/include/nvexec/stream/upon_error.cuh b/include/nvexec/stream/upon_error.cuh index 339ef8d4e..b6bf4c32e 100644 --- a/include/nvexec/stream/upon_error.cuh +++ b/include/nvexec/stream/upon_error.cuh @@ -50,7 +50,7 @@ namespace nvexec::_strm { template struct receiver_t { class __t : public stream_receiver_base { - using env_t = typename operation_state_base_t::env_t; + using env_t = operation_state_base_t::env_t; Fun f_; operation_state_base_t& op_state_; @@ -133,7 +133,7 @@ namespace nvexec::_strm { template struct result_size_for { - using __t = typename size_of_<__call_result_t>::__t; + using __t = size_of_<__call_result_t>::__t; }; template diff --git a/include/nvexec/stream/upon_stopped.cuh b/include/nvexec/stream/upon_stopped.cuh index cc9ba595f..6372457fa 100644 --- a/include/nvexec/stream/upon_stopped.cuh +++ b/include/nvexec/stream/upon_stopped.cuh @@ -55,7 +55,7 @@ namespace nvexec::_strm { struct receiver_t { class __t : public stream_receiver_base { using result_t = std::invoke_result_t; - using env_t = typename operation_state_base_t::env_t; + using env_t = operation_state_base_t::env_t; Fun f_; operation_state_base_t& op_state_; diff --git a/include/stdexec/__detail/__basic_sender.hpp b/include/stdexec/__detail/__basic_sender.hpp index 100387270..71855d731 100644 --- a/include/stdexec/__detail/__basic_sender.hpp +++ b/include/stdexec/__detail/__basic_sender.hpp @@ -169,7 +169,7 @@ namespace stdexec { template struct __state_box : __immovable { - using __tag_t = typename __decay_t<_Sexpr>::__tag_t; + using __tag_t = __decay_t<_Sexpr>::__tag_t; using __state_t = __state_type_t<__tag_t, _Sexpr, _Receiver>; __state_box(_Sexpr&& __sndr, _Receiver& __rcvr) @@ -218,7 +218,7 @@ namespace stdexec { template struct __op_base : __immovable { - using __tag_t = typename __decay_t<_Sexpr>::__tag_t; + using __tag_t = __decay_t<_Sexpr>::__tag_t; using __state_t = __state_type_t<__tag_t, _Sexpr, _Receiver>; STDEXEC_IMMOVABLE_NO_UNIQUE_ADDRESS @@ -256,7 +256,7 @@ namespace stdexec { struct __op_base<_Sexpr, _Receiver> : __receiver_box<_Receiver> , __state_box<_Sexpr, _Receiver> { - using __tag_t = typename __decay_t<_Sexpr>::__tag_t; + using __tag_t = __decay_t<_Sexpr>::__tag_t; using __state_t = __state_type_t<__tag_t, _Sexpr, _Receiver>; STDEXEC_IMMOVABLE(__op_base); @@ -388,10 +388,10 @@ namespace stdexec { template struct __op_state : __detail::__op_base<_Sexpr, _Receiver> { - using __desc_t = typename __decay_t<_Sexpr>::__desc_t; - using __tag_t = typename __desc_t::__tag; - using __data_t = typename __desc_t::__data; - using __state_t = typename __op_state::__state_t; + using __desc_t = __decay_t<_Sexpr>::__desc_t; + using __tag_t = __desc_t::__tag; + using __data_t = __desc_t::__data; + using __state_t = __op_state::__state_t; using __inner_ops_t = __result_of<__sexpr_apply, _Sexpr, __detail::__connect_fn<_Sexpr, _Receiver>>; @@ -407,7 +407,7 @@ namespace stdexec { } STDEXEC_ATTRIBUTE(always_inline) void start() & noexcept { - using __tag_t = typename __op_state::__tag_t; + using __tag_t = __op_state::__tag_t; auto&& __rcvr = this->__rcvr(); __inner_ops_.apply( [&](auto&... __ops) noexcept { @@ -419,7 +419,7 @@ namespace stdexec { template STDEXEC_ATTRIBUTE(always_inline) void __complete(_Index, _Tag2, _Args&&... __args) noexcept { - using __tag_t = typename __op_state::__tag_t; + using __tag_t = __op_state::__tag_t; auto&& __rcvr = this->__rcvr(); using _CompleteFn = __mtypeof<__sexpr_impl<__tag_t>::complete>; if constexpr (__callable<_CompleteFn, _Index, __op_state&, _Tag2, _Args...>) { @@ -472,7 +472,7 @@ namespace stdexec { using __id = __sexpr; using __t = __sexpr; using __desc_t = decltype(_DescriptorFn()); - using __tag_t = typename __desc_t::__tag; + using __tag_t = __desc_t::__tag; using __captures_t = __minvoke<__desc_t, __q<__detail::__captures_t>>; mutable __captures_t __impl_; diff --git a/include/stdexec/__detail/__cpo.hpp b/include/stdexec/__detail/__cpo.hpp index e9895fe60..22b214d78 100644 --- a/include/stdexec/__detail/__cpo.hpp +++ b/include/stdexec/__detail/__cpo.hpp @@ -104,7 +104,7 @@ namespace stdexec { }; template - using __arg_type_t = typename __arg_type<_Fn>::type; + using __arg_type_t = __arg_type<_Fn>::type; template struct __tag_type; @@ -115,7 +115,7 @@ namespace stdexec { }; template - using __tag_type_t = typename __tag_type<_Fn>::type; + using __tag_type_t = __tag_type<_Fn>::type; namespace tags { using stdexec::set_value_t; diff --git a/include/stdexec/__detail/__debug.hpp b/include/stdexec/__detail/__debug.hpp index 6701ea82e..9a283ce92 100644 --- a/include/stdexec/__detail/__debug.hpp +++ b/include/stdexec/__detail/__debug.hpp @@ -57,7 +57,7 @@ namespace stdexec { }; template - using __normalize_sig_t = typename __normalize_sig<_Sig>::__type; + using __normalize_sig_t = __normalize_sig<_Sig>::__type; #else template extern int __normalize_sig; diff --git a/include/stdexec/__detail/__intrusive_ptr.hpp b/include/stdexec/__detail/__intrusive_ptr.hpp index e316e40d5..622d70acd 100644 --- a/include/stdexec/__detail/__intrusive_ptr.hpp +++ b/include/stdexec/__detail/__intrusive_ptr.hpp @@ -48,7 +48,7 @@ namespace stdexec { }; template - using __bits_t = typename __count_and_bits<_ReservedBits>::__bits; + using __bits_t = __count_and_bits<_ReservedBits>::__bits; template struct __make_intrusive_t; @@ -61,7 +61,7 @@ namespace stdexec { auto __intrusive_from_this() noexcept -> __intrusive_ptr<_Ty, _ReservedBits>; auto __intrusive_from_this() const noexcept -> __intrusive_ptr; private: - using __bits_t = typename __count_and_bits<_ReservedBits>::__bits; + using __bits_t = __count_and_bits<_ReservedBits>::__bits; friend _Ty; auto __inc_ref() noexcept -> __bits_t; auto __dec_ref() noexcept -> __bits_t; @@ -80,7 +80,7 @@ namespace stdexec { template struct __control_block { - using __bits_t = typename __count_and_bits<_ReservedBits>::__bits; + using __bits_t = __count_and_bits<_ReservedBits>::__bits; static constexpr std::size_t __ref_count_increment = 1ul << _ReservedBits; alignas(_Ty) unsigned char __value_[sizeof(_Ty)]; diff --git a/include/stdexec/__detail/__just.hpp b/include/stdexec/__detail/__just.hpp index d51014b78..c1e93b42f 100644 --- a/include/stdexec/__detail/__just.hpp +++ b/include/stdexec/__detail/__just.hpp @@ -32,7 +32,7 @@ namespace stdexec { namespace __just { template struct __impl : __sexpr_defaults { - using __tag_t = typename _JustTag::__tag_t; + using __tag_t = _JustTag::__tag_t; static constexpr auto get_attrs = [](__ignore) noexcept -> cprop { diff --git a/include/stdexec/__detail/__let.hpp b/include/stdexec/__detail/__let.hpp index 6c4d2a4d9..4ec7e38a4 100644 --- a/include/stdexec/__detail/__let.hpp +++ b/include/stdexec/__detail/__let.hpp @@ -532,8 +532,8 @@ namespace stdexec { static void __bind(_OpState& __op_state, _As&&... __as) noexcept { using _State = decltype(__op_state.__state_); using _Receiver = decltype(__op_state.__rcvr_); - using _Fun = typename _State::__fun_t; - using _Sched = typename _State::__sched_t; + using _Fun = _State::__fun_t; + using _Sched = _State::__sched_t; using _ResultSender = __mcall<__result_sender_fn<_Set, _Fun, _Sched, env_of_t<_Receiver>>, _As...>; diff --git a/include/stdexec/__detail/__meta.hpp b/include/stdexec/__detail/__meta.hpp index 2752f3799..35f086651 100644 --- a/include/stdexec/__detail/__meta.hpp +++ b/include/stdexec/__detail/__meta.hpp @@ -30,7 +30,7 @@ namespace stdexec { //! That is, `typename _Tp::__t`. //! See MAINTAINERS.md#class-template-parameters for details. template - using __t = typename _Tp::__t; + using __t = _Tp::__t; template struct __mtype { @@ -331,7 +331,7 @@ namespace stdexec { // nvc++ does not. So we memoize the type computations by // indirecting through a class template specialization. template