NVIDIA / stdexec

`std::execution`, the proposed C++ framework for asynchronous and parallel programming.
Apache License 2.0
1.56k stars 159 forks source link

Questions regarding `receiver_adaptor` #426

Closed Chlorie closed 10 months ago

Chlorie commented 2 years ago

I don't know whether it is appropriate to ask this question here and I'm sorry if I'm not supposed to.

I've been trying to implement some parts of P2300 myself as a challenge, but there's always something wrong with receiver_adaptor. The code compiles for clang and MSVC, but not for gcc. I tried a reduced example on compiler explorer and it seems that the compilers differ in behavior dealing with requires { typename Derived::name; }. If the derived type has defined a name member function template it seems to shadow the type alias in the CRTP base, but gcc still disambiguate typename Derived::name as a type even if the name is shadowed by a function template. (https://godbolt.org/z/63McMrWW8)

Am I missing some details or is the behavior of gcc faulty on this issue?

ericniebler commented 10 months ago

i'm pretty sure receiver_adaptor as specified should work, but i too struggled getting compilers to accept it. i think gcc is in error. clang gets it right.