You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
STDEXEC_ENABLE_EXTRA_TYPE_CHECKING no longer checks senders in connect (since #1809) #2407
With STDEXEC_ENABLE_EXTRA_TYPE_CHECKING, connect used to instantiate completion_signatures_of_t for the sender it connects, so __debug_sender warned when a sender completes with something it did not declare. That came from #1070 (for #1065). The new connect from #1809 no longer does this, so now only code that names completion_signatures_of_t gets the check.
Example: a sender that declares set_value_t(int) but completes with set_value(std::move(rcvr), v), where v is an int lvalue. Compiled with -I<stdexec>/include -DSTDEXEC_ENABLE_EXTRA_TYPE_CHECKING, with GCC 12 and Clang 21:
I tried to put the check back into connect_t::operator(), and found two more things:
With the flag on, that breaks test/exec/test_any_sender.cpp with GCC 12 and Clang 21. when_any inside an any_sender then gets connected to __debug::__receiver, and static_assert(__nothrow_move_constructible<_Env>) in __fwd (__env.hpp) fails for the type-erased receiver environment. Main compiles that file with the flag on.
Is the flag still meant to work? If yes, I'd be happy to make a PR that restores the check in connect, makes it work with any_sender, and adds a build-failure test. For the SYSTEM part, one option is to not mark the include directory SYSTEM when STDEXEC_ENABLE_EXTRA_TYPE_CHECKING is ON. If you'd rather drop the flag, that's fine too.
Activity