C++ Logo

std-discussion

Advanced search

Re: The unnecessary confusion of the C++23 proposal P0847R6

From: Hani Deek <hani_deek_at_[hidden]>
Date: Tue, 3 Aug 2021 17:52:34 +0000
> You want to discard literally every use case of this feature *except*
> deduplication of `const` or other qualified parameters. You want a
> feature focused specifically on just that. It's still going to have to
> use templates to generate the various overloads, but you want it to
> only work in that use case. So we give up recursive lambdas, better
> CRTP, by-value members, SFINAE-friendly callables.

The types of the functions will have to be the ref-qualified types that were introduced in C++11. You can't use the older non-ref-qualified types because the implicit object parameter of the non-ref-qualified non-const-qualified type has a peculiar behavior that is different from a normal lvalue reference (it binds an rvalue even though it is not a reference to const).

The features you listed do not require passing the object parameter by value, except of course for the "pass-by-value" feature. This latter feature does not justify introducing a new function type.

Received on 2021-08-03 12:52:37