C++ Logo

std-proposals

Advanced search

Re: Two small ideas

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Wed, 8 Dec 2021 20:17:25 +0200
On Wed, 8 Dec 2021 at 20:07, Timur Doumler <cpp_at_[hidden]> wrote:
>
> There is some overlap here with the idea of making CTAD work for function arguments (and in other contexts where it is currently not allowed), which is something I am considering proposing for post-C++23.

Sure, I have run into that. We should perhaps sync these efforts, a
CTAD parameter needs to not drop the indication
that the function is a template, and deduced but type-constrained
parameters need to fit, and then it all needs to fit
into how variable declarations are done.

The syntax we chose for CTADed variables kinda blows, but at least it
doesn't restrict the syntactic design space, much.
It's non-reusable for parameters, though, because it completely loses
the "hey you're looking at a template here, beware"
bit of information.

Received on 2021-12-08 12:17:38