Skip to content

Commit 138e136

Browse files
authored
Remove unnecessary typename before dependent names (#1660)
1 parent ed9fd6c commit 138e136

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+143
-150
lines changed

examples/benchmark/fibonacci.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ auto serial_fib(long n) -> long {
2929

3030
template <class... Ts>
3131
using any_sender_of =
32-
typename exec::any_receiver_ref<stdexec::completion_signatures<Ts...>>::template any_sender<>;
32+
exec::any_receiver_ref<stdexec::completion_signatures<Ts...>>::template any_sender<>;
3333

3434
using fib_sender = any_sender_of<stdexec::set_value_t(long)>;
3535

examples/nvexec/maxwell/snr.cuh

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,14 @@ namespace ex = stdexec;
6161
namespace nvexec::_strm::repeat_n {
6262
template <class OpT>
6363
class receiver_2_t : public stream_receiver_base {
64-
using Sender = typename OpT::PredSender;
65-
using Receiver = typename OpT::Receiver;
64+
using Sender = OpT::PredSender;
65+
using Receiver = OpT::Receiver;
6666

6767
OpT& op_state_;
6868

6969
public:
7070
void set_value() noexcept {
71-
using inner_op_state_t = typename OpT::inner_op_state_t;
71+
using inner_op_state_t = OpT::inner_op_state_t;
7272

7373
op_state_.i_++;
7474

@@ -95,7 +95,7 @@ namespace nvexec::_strm::repeat_n {
9595
op_state_.propagate_completion_signal(set_stopped_t());
9696
}
9797

98-
auto get_env() const noexcept -> typename OpT::env_t {
98+
auto get_env() const noexcept -> OpT::env_t {
9999
return op_state_.make_env();
100100
}
101101

@@ -106,13 +106,13 @@ namespace nvexec::_strm::repeat_n {
106106

107107
template <class OpT>
108108
class receiver_1_t : public stream_receiver_base {
109-
using Receiver = typename OpT::Receiver;
109+
using Receiver = OpT::Receiver;
110110

111111
OpT& op_state_;
112112

113113
public:
114114
void set_value() noexcept {
115-
using inner_op_state_t = typename OpT::inner_op_state_t;
115+
using inner_op_state_t = OpT::inner_op_state_t;
116116

117117
if (op_state_.n_) {
118118
auto sch = ex::get_scheduler(ex::get_env(op_state_.rcvr_));
@@ -137,7 +137,7 @@ namespace nvexec::_strm::repeat_n {
137137
op_state_.propagate_completion_signal(set_stopped_t());
138138
}
139139

140-
auto get_env() const noexcept -> typename OpT::env_t {
140+
auto get_env() const noexcept -> OpT::env_t {
141141
return op_state_.make_env();
142142
}
143143

@@ -196,16 +196,16 @@ namespace repeat_n_detail {
196196

197197
template <class OpT>
198198
class receiver_2_t {
199-
using Sender = typename OpT::PredSender;
200-
using Receiver = typename OpT::Receiver;
199+
using Sender = OpT::PredSender;
200+
using Receiver = OpT::Receiver;
201201

202202
OpT& op_state_;
203203

204204
public:
205205
using receiver_concept = ex::receiver_t;
206206

207207
void set_value() noexcept {
208-
using inner_op_state_t = typename OpT::inner_op_state_t;
208+
using inner_op_state_t = OpT::inner_op_state_t;
209209

210210
op_state_.i_++;
211211

@@ -244,15 +244,15 @@ namespace repeat_n_detail {
244244

245245
template <class OpT>
246246
class receiver_1_t {
247-
using Receiver = typename OpT::Receiver;
247+
using Receiver = OpT::Receiver;
248248

249249
OpT& op_state_;
250250

251251
public:
252252
using receiver_concept = ex::receiver_t;
253253

254254
void set_value() noexcept {
255-
using inner_op_state_t = typename OpT::inner_op_state_t;
255+
using inner_op_state_t = OpT::inner_op_state_t;
256256

257257
if (op_state_.n_) {
258258
auto sch = ex::get_scheduler(ex::get_env(op_state_.rcvr_));

include/asioexec/as_default_on.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@ namespace asioexec {
2727

2828
template <typename CompletionToken, typename IoObject>
2929
using as_default_on_t =
30-
typename std::remove_cvref_t<IoObject>::template rebind_executor<executor_with_default<
30+
std::remove_cvref_t<IoObject>::template rebind_executor<executor_with_default<
3131
std::remove_cvref_t<decltype(std::declval<IoObject&>().get_executor())>,
32-
CompletionToken>>::other;
32+
CompletionToken
33+
>>::other;
3334

3435
namespace detail::as_default_on {
3536

include/asioexec/use_sender.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ namespace asioexec {
139139
};
140140

141141
template <typename... Args>
142-
using transform_set_value_t = typename transform_set_value<Args...>::type;
142+
using transform_set_value_t = transform_set_value<Args...>::type;
143143

144144
template <typename Signatures>
145145
using completion_signatures = ::stdexec::transform_completion_signatures<

include/exec/__detail/__basic_sequence.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ namespace exec {
3737
using __t = __seqexpr;
3838
using __id = __seqexpr;
3939
using __desc_t = decltype(_DescriptorFn());
40-
using __tag_t = typename __desc_t::__tag;
40+
using __tag_t = __desc_t::__tag;
4141
using __captures_t =
4242
stdexec::__minvoke<__desc_t, stdexec::__q<stdexec::__detail::__captures_t>>;
4343

include/exec/__detail/__bwos_lifo_queue.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ namespace exec::bwos {
8484

8585
private:
8686
template <class Sp>
87-
using allocator_of_t = typename std::allocator_traits<Allocator>::template rebind_alloc<Sp>;
87+
using allocator_of_t = std::allocator_traits<Allocator>::template rebind_alloc<Sp>;
8888

8989
struct block_type {
9090
explicit block_type(std::size_t block_size, Allocator allocator = Allocator());
@@ -319,8 +319,8 @@ namespace exec::bwos {
319319
}
320320

321321
template <class Tp, class Allocator>
322-
auto lifo_queue<Tp, Allocator>::block_type::operator=(const block_type &other) ->
323-
typename lifo_queue<Tp, Allocator>::block_type & {
322+
auto lifo_queue<Tp, Allocator>::block_type::operator=(const block_type &other)
323+
-> lifo_queue<Tp, Allocator>::block_type & {
324324
head_.store(other.head_.load(std::memory_order_relaxed), std::memory_order_relaxed);
325325
tail_.store(other.tail_.load(std::memory_order_relaxed), std::memory_order_relaxed);
326326
steal_tail_.store(other.steal_tail_.load(std::memory_order_relaxed), std::memory_order_relaxed);
@@ -339,8 +339,8 @@ namespace exec::bwos {
339339
}
340340

341341
template <class Tp, class Allocator>
342-
auto lifo_queue<Tp, Allocator>::block_type::operator=(block_type &&other) noexcept ->
343-
typename lifo_queue<Tp, Allocator>::block_type & {
342+
auto lifo_queue<Tp, Allocator>::block_type::operator=(block_type &&other) noexcept
343+
-> lifo_queue<Tp, Allocator>::block_type & {
344344
head_.store(other.head_.load(std::memory_order_relaxed), std::memory_order_relaxed);
345345
tail_.store(other.tail_.load(std::memory_order_relaxed), std::memory_order_relaxed);
346346
steal_tail_.store(other.steal_tail_.load(std::memory_order_relaxed), std::memory_order_relaxed);

include/exec/any_sender_of.hpp

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ namespace exec {
333333
void __construct_small(_As&&... __args) {
334334
static_assert(sizeof(_Tp) <= __buffer_size && alignof(_Tp) <= __alignment);
335335
_Tp* __pointer = reinterpret_cast<_Tp*>(&__buffer_[0]);
336-
using _Alloc = typename std::allocator_traits<_Allocator>::template rebind_alloc<_Tp>;
336+
using _Alloc = std::allocator_traits<_Allocator>::template rebind_alloc<_Tp>;
337337
_Alloc __alloc{__allocator_};
338338
std::allocator_traits<_Alloc>::construct(
339339
__alloc, __pointer, static_cast<_As&&>(__args)...);
@@ -342,7 +342,7 @@ namespace exec {
342342

343343
template <class _Tp, class... _As>
344344
void __construct_large(_As&&... __args) {
345-
using _Alloc = typename std::allocator_traits<_Allocator>::template rebind_alloc<_Tp>;
345+
using _Alloc = std::allocator_traits<_Allocator>::template rebind_alloc<_Tp>;
346346
_Alloc __alloc{__allocator_};
347347
_Tp* __pointer = std::allocator_traits<_Alloc>::allocate(__alloc, 1);
348348
STDEXEC_TRY {
@@ -361,7 +361,7 @@ namespace exec {
361361
if (!__self.__object_pointer_) {
362362
return;
363363
}
364-
using _Alloc = typename std::allocator_traits<_Allocator>::template rebind_alloc<_Tp>;
364+
using _Alloc = std::allocator_traits<_Allocator>::template rebind_alloc<_Tp>;
365365
_Alloc __alloc{__self.__allocator_};
366366
_Tp* __pointer = static_cast<_Tp*>(std::exchange(__self.__object_pointer_, nullptr));
367367
std::allocator_traits<_Alloc>::destroy(__alloc, __pointer);
@@ -500,15 +500,15 @@ namespace exec {
500500
void __construct_small(_As&&... __args) {
501501
static_assert(sizeof(_Tp) <= __buffer_size && alignof(_Tp) <= __alignment);
502502
_Tp* __pointer = reinterpret_cast<_Tp*>(&__buffer_[0]);
503-
using _Alloc = typename std::allocator_traits<_Allocator>::template rebind_alloc<_Tp>;
503+
using _Alloc = std::allocator_traits<_Allocator>::template rebind_alloc<_Tp>;
504504
_Alloc __alloc{__allocator_};
505505
std::allocator_traits<_Alloc>::construct(__alloc, __pointer, static_cast<_As&&>(__args)...);
506506
__object_pointer_ = __pointer;
507507
}
508508

509509
template <class _Tp, class... _As>
510510
void __construct_large(_As&&... __args) {
511-
using _Alloc = typename std::allocator_traits<_Allocator>::template rebind_alloc<_Tp>;
511+
using _Alloc = std::allocator_traits<_Allocator>::template rebind_alloc<_Tp>;
512512
_Alloc __alloc{__allocator_};
513513
_Tp* __pointer = std::allocator_traits<_Alloc>::allocate(__alloc, 1);
514514
STDEXEC_TRY {
@@ -527,7 +527,7 @@ namespace exec {
527527
if (!__self.__object_pointer_) {
528528
return;
529529
}
530-
using _Alloc = typename std::allocator_traits<_Allocator>::template rebind_alloc<_Tp>;
530+
using _Alloc = std::allocator_traits<_Allocator>::template rebind_alloc<_Tp>;
531531
_Alloc __alloc{__self.__allocator_};
532532
_Tp* __pointer = static_cast<_Tp*>(std::exchange(__self.__object_pointer_, nullptr));
533533
std::allocator_traits<_Alloc>::destroy(__alloc, __pointer);
@@ -546,7 +546,7 @@ namespace exec {
546546
if constexpr (__is_small<_Tp>) {
547547
_Tp& __other_object = *__pointer;
548548
__self.template __construct_small<_Tp>(static_cast<_Tp&&>(__other_object));
549-
using _Alloc = typename std::allocator_traits<_Allocator>::template rebind_alloc<_Tp>;
549+
using _Alloc = std::allocator_traits<_Allocator>::template rebind_alloc<_Tp>;
550550
_Alloc __alloc{__self.__allocator_};
551551
std::allocator_traits<_Alloc>::destroy(__alloc, __pointer);
552552
} else {
@@ -873,9 +873,8 @@ namespace exec {
873873
struct __operation_base {
874874
STDEXEC_ATTRIBUTE(no_unique_address) _Receiver __rcvr_;
875875
stdexec::inplace_stop_source __stop_source_{};
876-
using __stop_callback = typename stdexec::stop_token_of_t<
877-
stdexec::env_of_t<_Receiver>
878-
>::template callback_type<__on_stop_t>;
876+
using __stop_callback =
877+
stdexec::stop_token_of_t<stdexec::env_of_t<_Receiver>>::template callback_type<__on_stop_t>;
879878
std::optional<__stop_callback> __on_stop_{};
880879
};
881880

@@ -1250,9 +1249,9 @@ namespace exec {
12501249
}
12511250

12521251
template <stdexec::__decays_to<any_sender> _Self, class... _Env>
1253-
requires(__any::__satisfies_receiver_query<decltype(_ReceiverQueries), _Env ...> && ...)
1254-
static auto get_completion_signatures(_Self&&, _Env&&...) noexcept ->
1255-
typename __sender_base::completion_signatures {
1252+
requires(__any::__satisfies_receiver_query<decltype(_ReceiverQueries), _Env...> && ...)
1253+
static auto get_completion_signatures(_Self&&, _Env&&...) noexcept
1254+
-> __sender_base::completion_signatures {
12561255
return {};
12571256
}
12581257

@@ -1298,10 +1297,10 @@ namespace exec {
12981297
stdexec::get_completion_scheduler<stdexec::set_value_t>.signature<any_scheduler() noexcept>;
12991298
template <class... _Queries>
13001299
using __schedule_sender_fn =
1301-
typename __schedule_receiver::template any_sender<__any_scheduler_noexcept_signature>;
1300+
__schedule_receiver::template any_sender<__any_scheduler_noexcept_signature>;
13021301
#else
13031302
template <class... _Queries>
1304-
using __schedule_sender_fn = typename __schedule_receiver::template any_sender<
1303+
using __schedule_sender_fn = __schedule_receiver::template any_sender<
13051304
stdexec::get_completion_scheduler<stdexec::set_value_t>.template signature<any_scheduler() noexcept>
13061305
>;
13071306
#endif

include/exec/async_scope.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ namespace exec {
311311

312312
class __t : __subscription {
313313
using __forward_consumer =
314-
typename stop_token_of_t<env_of_t<_Receiver>>::template callback_type<__forward_stopped>;
314+
stop_token_of_t<env_of_t<_Receiver>>::template callback_type<__forward_stopped>;
315315

316316
void __complete_() noexcept {
317317
STDEXEC_TRY {

include/exec/fork_join.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ namespace exec {
5959
>;
6060

6161
template <class Completions>
62-
using _variant_t = typename stdexec::__mset_insert<
62+
using _variant_t = stdexec::__mset_insert<
6363
stdexec::__for_each_completion_signature<
6464
Completions,
6565
stdexec::__decayed_tuple,

include/exec/just_from.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ namespace exec {
153153
};
154154

155155
template <class Fn, class Tag = JustTag>
156-
using _sndr = typename Tag::template _sndr<Fn>;
156+
using _sndr = Tag::template _sndr<Fn>;
157157

158158
public:
159159
template <class Fn>

0 commit comments

Comments
 (0)