cplusplus / sender-receiver

Issues list for P2300
Apache License 2.0
19 stars 3 forks source link

Are `transform_sender`/`transform_env`/`apply_sender` supposed to be ADL customization points? #288

Closed jiixyj closed 1 month ago

jiixyj commented 1 month ago

In the current C++ draft those three are defined as functions. There are many places in the spex where those functions are called unqualified, such as:

Otherwise, the expression stopped_as_error(sndr, err) is expression-equivalent to: transform_sender(get-domain-early(sndr), make-sender(stopped_as_error, err, sndr)) except that sndr is only evaluated once.

Is ADL intentional here? I wouldn't have thought so, as e.g. transform_sender's spec is more "CPO-like". Or am I misinterpreting the spec?

lewissbaker commented 1 month ago

There is some blanket wording in the library front-matter that says that unqualfied names in specification are resolved using unqualified name lookup rather than argument dependent name lookup unless otherwise specified.

https://eel.is/c++draft/library#contents-3

So all of these calls are intended to be resolved to calls to the CPO function objects and are not ADL-calls.

jiixyj commented 1 month ago

Thank you, that makes sense. Sorry for the noise!