Rather than having Mine::my_cpo(args) find its customizations by making an ADL call to tag_invoke(Mine::my_cpo, args), look into having the customization be found with my_cpo(Mine::my_cpo, args). This would avoid the scaling issues of tag_invoke.
The tricky part is making sure that arbitrary queries can be forwarded in this scheme. This can be done if queries provide a CRTP base that does the forwarding for you.
In light of the fact that we're unlikely to get language support for customization points in C++26, it's important (IMO) to find a scalable replacement for tag_invoke.
Issue by ericniebler Friday Nov 18, 2022 at 20:36 GMT Originally opened as https://github.com/NVIDIA/stdexec/issues/686
Rather than having
Mine::my_cpo(args)
find its customizations by making an ADL call totag_invoke(Mine::my_cpo, args)
, look into having the customization be found withmy_cpo(Mine::my_cpo, args)
. This would avoid the scaling issues oftag_invoke
.The tricky part is making sure that arbitrary queries can be forwarded in this scheme. This can be done if queries provide a CRTP base that does the forwarding for you.
The following gist demonstrates the technique: https://gist.github.com/ericniebler/8e07f57a50d4de989d26bf15159a4730
In light of the fact that we're unlikely to get language support for customization points in C++26, it's important (IMO) to find a scalable replacement for
tag_invoke
.