Skip to content

Commit e69adaa

Browse files
committed
more bug fixes and work around gcc<13 bugs
1 parent 9d4cf64 commit e69adaa

File tree

5 files changed

+16
-18
lines changed

5 files changed

+16
-18
lines changed

include/exec/sequence.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -186,15 +186,15 @@ namespace exec {
186186
stdexec::__minvoke<stdexec::__mfold_left<void, stdexec::__q2<_fold_fn>>, Sndrs...>;
187187
};
188188

189-
template <class... Sndrs>
190-
struct _sndr {
189+
template <class Sndr0, class... Sndrs>
190+
struct _sndr<Sndr0, Sndrs...> {
191191
using sender_concept = stdexec::sender_t;
192192

193193
template <class... Env>
194-
using _completions_t = stdexec::__minvoke<_completions<Env...>, Sndrs...>;
194+
using _completions_t = stdexec::__minvoke<_completions<Env...>, Sndr0, Sndrs...>;
195195

196196
template <class Self, class... Env>
197-
requires(stdexec::__decay_copyable<stdexec::__copy_cvref_t<Self, Sndrs>> && ...)
197+
requires stdexec::__decay_copyable<Self>
198198
STDEXEC_ATTRIBUTE(host, device)
199199
STDEXEC_EXPLICIT_THIS_BEGIN(auto get_completion_signatures)(this Self&&, Env&&...)
200200
-> _completions_t<Env...> {
@@ -203,17 +203,17 @@ namespace exec {
203203
STDEXEC_EXPLICIT_THIS_END(get_completion_signatures)
204204

205205
template <class Self, class Rcvr>
206-
requires(stdexec::__decay_copyable<stdexec::__copy_cvref_t<Self, Sndrs>> && ...)
206+
requires stdexec::__decay_copyable<Self>
207207
STDEXEC_ATTRIBUTE(host, device)
208208
STDEXEC_EXPLICIT_THIS_BEGIN(auto connect)(this Self&& self, Rcvr rcvr) {
209-
return _opstate<Rcvr, Sndrs...>{
209+
return _opstate<Rcvr, stdexec::__copy_cvref_t<Self, Sndr0>, Sndrs...>{
210210
static_cast<Rcvr&&>(rcvr), static_cast<Self&&>(self)._sndrs};
211211
}
212212
STDEXEC_EXPLICIT_THIS_END(connect)
213213

214214
STDEXEC_ATTRIBUTE(no_unique_address, maybe_unused) sequence_t _tag;
215215
STDEXEC_ATTRIBUTE(no_unique_address, maybe_unused) stdexec::__ignore _ignore;
216-
stdexec::__tuple<Sndrs...> _sndrs;
216+
stdexec::__tuple<Sndr0, Sndrs...> _sndrs;
217217
};
218218

219219
template <class Sndr>

include/nvexec/stream/continues_on.cuh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,19 +161,19 @@ namespace nvexec::_strm {
161161
: sndr_(schedule_from(static_cast<Sender&&>(sndr))) {
162162
}
163163

164-
template <__decays_to<source_sender_t> Self, receiver Receiver>
164+
template <__decay_copyable Self, receiver Receiver>
165165
STDEXEC_EXPLICIT_THIS_BEGIN(auto connect)(this Self&& self, Receiver rcvr)
166166
-> connect_result_t<__copy_cvref_t<Self, schedule_from_sender_t>, Receiver> {
167167
return stdexec::connect(static_cast<Self&&>(self).sndr_, static_cast<Receiver&&>(rcvr));
168168
}
169169
STDEXEC_EXPLICIT_THIS_END(connect)
170170

171-
template <__decays_to<source_sender_t> _Self, class... _Env>
171+
template <__decay_copyable _Self, class... _Env>
172172
STDEXEC_EXPLICIT_THIS_BEGIN(auto get_completion_signatures)(this _Self&&, _Env&&...)
173173
-> __completion_signatures_of_t<__copy_cvref_t<_Self, Sender>, _Env...> {
174174
return {};
175175
}
176-
STDEXEC_EXPLICIT_THIS_END(get_completion_signatures)
176+
STDEXEC_EXPLICIT_THIS_END(get_completion_signatures)
177177

178178
[[nodiscard]]
179179
auto get_env() const noexcept -> env_of_t<const Sender&> {

include/stdexec/__detail/__let.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ namespace stdexec {
551551
static_assert(sender_expr_for<_Sender, __let_t<_SetTag>>);
552552
using _Fun = __decay_t<__data_of<_Sender>>;
553553
using _Child = __child_of<_Sender>;
554-
using _Env2 = __env2_t<_SetTag, env_of_t<const _Child&>, env_of_t<const _Receiver&>>;
554+
using _Env2 = __env2_t<_SetTag, env_of_t<_Child>, env_of_t<_Receiver>>;
555555
using __mk_let_state = __mbind_front_q<__let_state, _Receiver, _Fun, _SetTag, _Env2>;
556556

557557
using __let_state_t = __gather_completions_of<

include/stdexec/__detail/__meta.hpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -830,15 +830,12 @@ namespace stdexec {
830830
using __demangle_fn = decltype(__demangle_v<_Ty>);
831831

832832
template <class _Ty>
833-
extern __mcompose<__cplr, __demangle_fn<_Ty>> __demangle_v<_Ty &>;
834-
835-
template <class _Ty>
836-
extern __mcompose<__cpclr, __demangle_fn<_Ty>> __demangle_v<_Ty const &>;
833+
using __demangle_t = __minvoke<__demangle_fn<_Ty>, _Ty>;
837834
} // namespace __detail
838835

839836
// A utility for pretty-printing type names in diagnostics
840837
template <class _Ty>
841-
using __demangle_t = __minvoke<__detail::__demangle_fn<_Ty>, _Ty>;
838+
using __demangle_t = __copy_cvref_t<_Ty, __detail::__demangle_t<std::remove_cvref_t<_Ty>>>;
842839

843840
namespace __detail {
844841
//////////////////////////////////////////////////////////////////////////////////////////

include/stdexec/__detail/__shared.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,9 +433,10 @@ namespace stdexec::__shared {
433433
struct __shared_impl : __sexpr_defaults {
434434
static constexpr auto get_state =
435435
[]<class _CvrefSender, class _Receiver>(_CvrefSender&& __sndr, _Receiver&) noexcept
436-
-> __local_state<_CvrefSender, _Receiver> {
436+
-> __local_state<_CvrefSender, _Receiver>
437+
requires __decay_copyable<__data_of<_CvrefSender>>
438+
{
437439
static_assert(sender_expr_for<_CvrefSender, _Tag>);
438-
static_assert(__decay_copyable<_CvrefSender>);
439440
return __local_state<_CvrefSender, _Receiver>{static_cast<_CvrefSender&&>(__sndr)};
440441
};
441442

0 commit comments

Comments
 (0)