@@ -246,22 +246,10 @@ namespace STDEXEC
246246 template <class _Alloc , scope_token _Token, sender _Sender, class _Env >
247247 struct __spawn_future_state final
248248 : __spawn_future_state_base<
249- // the spec says completion_signatures_of_t<__future_spawned_sender<_Sender, _Env>> but
250- // that breaks with an inscrutable error for _Sender = starts_on(sched, just() | then(...))
251- //
252- // I managed to fix the break by adding an extra _Env to the query, like so:
253- //
254- // completion_signatures_of_t<__future_spawned_sender<_Sender, _Env>, _Env>
255- //
256- // but that's hard to justify--the future-spawned-sender will be connected to a receiver
257- // with an empty environment after all. This code works; I don't understand why the extra
258- // env type changes the result, but this is a reasonably small change we can make to the
259- // spec to bring things into alignment.
249+ // NOT TO SPEC: see https://github.com/cplusplus/sender-receiver/issues/356
260250 completion_signatures_of_t <__future_spawned_sender<_Sender, _Env>, env<>>>
261251 {
262- using __sigs_t =
263- // this is "wrong" in the same way as the above
264- completion_signatures_of_t <__future_spawned_sender<_Sender, _Env>, env<>>;
252+ using __sigs_t = completion_signatures_of_t <__future_spawned_sender<_Sender, _Env>, env<>>;
265253
266254 using __receiver_t = __spawn_future_receiver<__sigs_t >;
267255
@@ -664,16 +652,16 @@ namespace STDEXEC
664652 template <sender _Sender, scope_token _Token, class _Env >
665653 auto __impl (_Sender&& __sndr, _Token&& __tkn, _Env&& __env) const
666654 {
667- using __alloc_t = decltype (__spawn_common::__choose_alloc (__env, get_env (__sndr)));
668- using __senv_t = decltype (__spawn_common::__choose_senv (__env, get_env (__sndr)));
655+ using __alloc_t = decltype (__spawn_common::__choose_alloc (__env, STDEXEC:: get_env (__sndr)));
656+ using __senv_t = decltype (__spawn_common::__choose_senv (__env, STDEXEC:: get_env (__sndr)));
669657
670658 using __spawn_future_state_t =
671659 __spawn_future_state<__alloc_t , std::remove_cvref_t <_Token>, _Sender, __senv_t >;
672660
673661 using __traits =
674662 std::allocator_traits<__alloc_t >::template rebind_traits<__spawn_future_state_t >;
675663 typename __traits::allocator_type __alloc (
676- __spawn_common::__choose_alloc (__env, get_env (__sndr)));
664+ __spawn_common::__choose_alloc (__env, STDEXEC:: get_env (__sndr)));
677665
678666 auto * __op = __traits::allocate (__alloc, 1 );
679667
@@ -684,7 +672,7 @@ namespace STDEXEC
684672 __alloc,
685673 static_cast <_Sender&&>(__sndr),
686674 static_cast <_Token&&>(__tkn),
687- __spawn_common::__choose_senv (__env, get_env (__sndr)));
675+ __spawn_common::__choose_senv (__env, STDEXEC:: get_env (__sndr)));
688676
689677 __guard.__dismiss ();
690678
0 commit comments