Skip to content

Commit 9ecb671

Browse files
authored
Merge pull request #1808 from ericniebler/metaprogramming-naming-consistency
rename `__types` to `__mlist`
2 parents 8bf1806 + 850e8f5 commit 9ecb671

19 files changed

+104
-98
lines changed

include/exec/any_sender_of.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -964,7 +964,7 @@ namespace exec {
964964
}
965965
};
966966

967-
template <class _Sigs, class _SenderQueries = __types<>, class _ReceiverQueries = __types<>>
967+
template <class _Sigs, class _SenderQueries = __mlist<>, class _ReceiverQueries = __mlist<>>
968968
struct __sender {
969969
using sender_concept = STDEXEC::sender_t;
970970
using completion_signatures = _Sigs;
@@ -1047,7 +1047,7 @@ namespace exec {
10471047
void* __sender_;
10481048
};
10491049

1050-
template <class _ScheduleSender, class _SchedulerQueries = __types<>>
1050+
template <class _ScheduleSender, class _SchedulerQueries = __mlist<>>
10511051
class __scheduler {
10521052
static constexpr std::size_t __buffer_size = 4 * sizeof(void*);
10531053
template <class _Ty>
@@ -1147,7 +1147,7 @@ namespace exec {
11471147
} // namespace __any
11481148

11491149
template <auto... _Sigs>
1150-
using queries = STDEXEC::__types<decltype(_Sigs)...>;
1150+
using queries = STDEXEC::__mlist<decltype(_Sigs)...>;
11511151

11521152
template <class _Completions, auto... _ReceiverQueries>
11531153
class any_receiver_ref {

include/exec/repeat_until.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,10 +247,10 @@ namespace exec {
247247
transform_sender(STDEXEC::set_value_t, _CvSender &&__sndr, const _Env &) noexcept {
248248
using namespace STDEXEC;
249249
using __child_t = __child_of<_CvSender>;
250-
using __values_t = value_types_of_t<__child_t, _Env, __types, __types>;
250+
using __values_t = value_types_of_t<__child_t, _Env, __mlist, __mlist>;
251251
auto &[__tag, __ign, __child] = __sndr;
252252

253-
if constexpr (__same_as<__values_t, __types<>> || __same_as<__values_t, __types<__types<>>>) {
253+
if constexpr (__same_as<__values_t, __mlist<>> || __same_as<__values_t, __mlist<__mlist<>>>) {
254254
return repeat_until_t()(then(static_cast<__child_t &&>(__child), _never{}));
255255
} else {
256256
return __not_a_sender<

include/exec/sequence.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ namespace exec {
135135
STDEXEC::__mfill_c<
136136
sizeof...(Senders),
137137
STDEXEC::__mfalse,
138-
STDEXEC::__mbind_back_q<STDEXEC::__types, STDEXEC::__mtrue>
138+
STDEXEC::__mbind_back_q<STDEXEC::__mlist, STDEXEC::__mtrue>
139139
>
140140
>;
141141

include/exec/sequence/any_sequence_of.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ namespace exec {
211211
void* __sender_;
212212
};
213213

214-
template <class _Sigs, class _SenderQueries = __types<>, class _ReceiverQueries = __types<>>
214+
template <class _Sigs, class _SenderQueries = __mlist<>, class _ReceiverQueries = __mlist<>>
215215
struct __sequence_sender {
216216
using __receiver_ref_t = __next_receiver_ref<_Sigs, _ReceiverQueries>;
217217
using __vtable_t = __sender_vtable<_Sigs, _SenderQueries, _ReceiverQueries>;

include/exec/sequence/ignore_all_values.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,9 @@ namespace exec {
228228
template <class _Sigs>
229229
using __result_variant_ = __transform_completion_signatures_t<
230230
_Sigs,
231-
__mconst<__types<>>::__f,
232-
__mcompose_q<__types, __mbind_front_q<__decayed_tuple, set_error_t>::__f>::__f,
233-
__types<__tuple<set_stopped_t>>,
231+
__mconst<__mlist<>>::__f,
232+
__mcompose_q<__mlist, __mbind_front_q<__decayed_tuple, set_error_t>::__f>::__f,
233+
__mlist<__tuple<set_stopped_t>>,
234234
__mconcat<__qq<__variant_for>>::__f
235235
>;
236236

include/exec/sequence/merge_each.hpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ namespace exec {
131131
};
132132

133133
template <class... _Args>
134-
using drop = __types<>;
134+
using drop = __mlist<>;
135135

136136
enum class __completion_t {
137137
__started,
@@ -755,7 +755,7 @@ namespace exec {
755755
template <class... _Senders>
756756
using __f = __minvoke_if_c<
757757
__arg_of_base_t<_Env...>::template __valid_args<_Senders...>(),
758-
__mconst<STDEXEC::__types<_Senders...>>,
758+
__mconst<STDEXEC::__mlist<_Senders...>>,
759759
__value_completions_error<_Sequence, _Sender, _Env...>,
760760
_Senders...
761761
>;
@@ -770,9 +770,9 @@ namespace exec {
770770
// if set_value
771771
__arg_of_t<_Sequence, _Sender, _Env...>::template __f,
772772
// else remove
773-
STDEXEC::__mconst<STDEXEC::__types<>>::__f,
774-
// concat to __types result
775-
STDEXEC::__mconcat<STDEXEC::__qq<STDEXEC::__types>>::__f
773+
STDEXEC::__mconst<STDEXEC::__mlist<>>::__f,
774+
// concat to __mlist result
775+
STDEXEC::__mconcat<STDEXEC::__qq<STDEXEC::__mlist>>::__f
776776
>;
777777
};
778778

@@ -786,9 +786,9 @@ namespace exec {
786786
struct __nested_sequences_fn {
787787
template <class... _Senders>
788788
using __f = __mapply<
789-
STDEXEC::__munique<STDEXEC::__qq<__types>>,
789+
STDEXEC::__munique<STDEXEC::__qq<__mlist>>,
790790
STDEXEC::__minvoke<
791-
STDEXEC::__mconcat<STDEXEC::__qq<__types>>,
791+
STDEXEC::__mconcat<STDEXEC::__qq<__mlist>>,
792792
__minvoke_q<__nested_sequences_from_item_type_t, _Sequence, _Senders, _Env...>...
793793
>
794794
>;
@@ -806,7 +806,7 @@ namespace exec {
806806
struct __all_nested_values_fn {
807807
template <class... _Sequences>
808808
using __f = STDEXEC::__minvoke<
809-
STDEXEC::__mconcat<STDEXEC::__qq<STDEXEC::__types>>,
809+
STDEXEC::__mconcat<STDEXEC::__qq<STDEXEC::__mlist>>,
810810
__item_types_of_t<_Sequences, _Env...>...
811811
>;
812812
};
@@ -824,15 +824,15 @@ namespace exec {
824824
template <class _Sender>
825825
using __f = STDEXEC::__error_types_t<
826826
__completion_signatures_of_t<_Sender, _Env...>,
827-
STDEXEC::__qq<STDEXEC::__types>
827+
STDEXEC::__qq<STDEXEC::__mlist>
828828
>;
829829
};
830830

831831
template <class _Senders, class... _Env>
832832
using __error_types_t = __mapply<
833833
STDEXEC::__mtransform<
834834
__error_types_fn<_Env...>,
835-
STDEXEC::__mconcat<STDEXEC::__qq<STDEXEC::__types>>
835+
STDEXEC::__mconcat<STDEXEC::__qq<STDEXEC::__mlist>>
836836
>,
837837
_Senders
838838
>;
@@ -848,9 +848,9 @@ namespace exec {
848848

849849
template <class _Sequence, class... _Env>
850850
using __errors_t = STDEXEC::__minvoke<
851-
STDEXEC::__mconcat<STDEXEC::__qq<STDEXEC::__types>>,
851+
STDEXEC::__mconcat<STDEXEC::__qq<STDEXEC::__mlist>>,
852852
// always include std::exception_ptr
853-
STDEXEC::__types<std::exception_ptr>,
853+
STDEXEC::__mlist<std::exception_ptr>,
854854
// include errors from senders of the nested sequences
855855
__error_types_t<__item_types_of_t<_Sequence, _Env...>, _Env...>,
856856
// include errors from the nested sequences

include/exec/sequence_senders.hpp

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

202202
template <class... _Senders>
203203
struct item_types {
204-
template <class _Fn, class _Continuation = STDEXEC::__qq<STDEXEC::__types>>
204+
template <class _Fn, class _Continuation = STDEXEC::__qq<STDEXEC::__mlist>>
205205
static constexpr auto __transform(_Fn __fn, _Continuation __continuation = {}) {
206206
return __continuation(__fn.template operator()<_Senders>()...);
207207
}

include/nvexec/stream/when_all.cuh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ namespace nvexec::_strm {
6767

6868
template <class... Env, class... Senders>
6969
requires(too_many_completions_sender<Senders, Env...> || ...)
70-
struct completions<__types<Env...>, Senders...> {
70+
struct completions<__mlist<Env...>, Senders...> {
7171
static constexpr auto position_of() noexcept -> std::size_t {
7272
constexpr bool which[] = {too_many_completions_sender<Senders, Env...>...};
7373
return __pos_of(which, which + sizeof...(Senders));
@@ -79,7 +79,7 @@ namespace nvexec::_strm {
7979

8080
template <class... Env, class... Senders>
8181
requires(valid_child_sender<Senders, Env...> && ...)
82-
struct completions<__types<Env...>, Senders...> {
82+
struct completions<__mlist<Env...>, Senders...> {
8383
using non_values_t = __minvoke_q<
8484
__concat_completion_signatures_t,
8585
completion_signatures<set_error_t(cudaError_t), set_stopped_t()>,
@@ -94,8 +94,8 @@ namespace nvexec::_strm {
9494
__mconcat<__qf<set_value_t>>,
9595
__value_types_t<
9696
__completion_signatures_of_t<Senders, Env...>,
97-
__q<__types>,
98-
__msingle_or<__types<>>
97+
__q<__mlist>,
98+
__msingle_or<__mlist<>>
9999
>...
100100
>;
101101

@@ -126,7 +126,7 @@ namespace nvexec::_strm {
126126

127127
template <class Cv, class... Env>
128128
using _completions_t = STDEXEC::__t<
129-
_when_all::completions<__types<_when_all::env_t<Env>...>, __copy_cvref_t<Cv, Senders>...>
129+
_when_all::completions<__mlist<_when_all::env_t<Env>...>, __copy_cvref_t<Cv, Senders>...>
130130
>;
131131

132132
public:

include/stdexec/__detail/__completion_signatures.hpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -129,14 +129,14 @@ namespace STDEXEC {
129129
// __partitions specialization. If the cache is never accessed, it is never
130130
// instantiated.
131131
template <
132-
class _ValueTuplesList = __types<>,
133-
class _ErrorsList = __types<>,
134-
class _StoppedList = __types<>
132+
class _ValueTuplesList = __mlist<>,
133+
class _ErrorsList = __mlist<>,
134+
class _StoppedList = __mlist<>
135135
>
136136
struct __partitions;
137137

138138
template <class... _ValueTuples, class... _Errors, class... _Stopped>
139-
struct __partitions<__types<_ValueTuples...>, __types<_Errors...>, __types<_Stopped...>> {
139+
struct __partitions<__mlist<_ValueTuples...>, __mlist<_Errors...>, __mlist<_Stopped...>> {
140140
template <class _Tuple, class _Variant>
141141
using __value_types = _Variant::template __f<__mapply<_Tuple, _ValueTuples>...>;
142142

@@ -184,25 +184,25 @@ namespace STDEXEC {
184184
struct __partitioned_fold_fn<set_value_t> {
185185
template <class... _ValueTuples, class _Errors, class _Stopped, class _Values>
186186
constexpr auto operator()(
187-
__partitions<__types<_ValueTuples...>, _Errors, _Stopped>&,
187+
__partitions<__mlist<_ValueTuples...>, _Errors, _Stopped>&,
188188
__undefined<_Values>&) const
189-
-> __undefined<__partitions<__types<_ValueTuples..., _Values>, _Errors, _Stopped>>&;
189+
-> __undefined<__partitions<__mlist<_ValueTuples..., _Values>, _Errors, _Stopped>>&;
190190
};
191191

192192
template <>
193193
struct __partitioned_fold_fn<set_error_t> {
194194
template <class _Values, class... _Errors, class _Stopped, class _Error>
195195
constexpr auto operator()(
196-
__partitions<_Values, __types<_Errors...>, _Stopped>&,
197-
__undefined<__types<_Error>>&) const
198-
-> __undefined<__partitions<_Values, __types<_Errors..., _Error>, _Stopped>>&;
196+
__partitions<_Values, __mlist<_Errors...>, _Stopped>&,
197+
__undefined<__mlist<_Error>>&) const
198+
-> __undefined<__partitions<_Values, __mlist<_Errors..., _Error>, _Stopped>>&;
199199
};
200200

201201
template <>
202202
struct __partitioned_fold_fn<set_stopped_t> {
203203
template <class _Values, class _Errors, class _Stopped>
204204
constexpr auto operator()(__partitions<_Values, _Errors, _Stopped>&, __ignore) const
205-
-> __undefined<__partitions<_Values, _Errors, __types<set_stopped_t()>>>&;
205+
-> __undefined<__partitions<_Values, _Errors, __mlist<set_stopped_t()>>>&;
206206
};
207207

208208
// The following overload of binary operator* is used to build up the cache of completion
@@ -213,7 +213,7 @@ namespace STDEXEC {
213213
constexpr auto operator*(__undefined<_Partitioned>&, _Tag (*)(_Args...)) -> __call_result_t<
214214
__partitioned_fold_fn<_Tag>,
215215
_Partitioned&,
216-
__undefined<__types<_Args...>>&
216+
__undefined<__mlist<_Args...>>&
217217
>;
218218

219219
// This function declaration is used to extract the cache from the `__undefined` type.

include/stdexec/__detail/__concepts.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ namespace STDEXEC {
5252

5353
//////////////////////////////////////////////////////////////////////////////////////////////////
5454
template <class...>
55-
struct __types;
55+
struct __mlist;
5656

5757
template <class... _Ts>
5858
concept __typename = requires {
59-
typename __types<_Ts...>; // NOLINT
59+
typename __mlist<_Ts...>; // NOLINT
6060
};
6161

6262
//////////////////////////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)