C++ Logo

std-proposals

Advanced search

Re: Two small ideas

From: Gašper Ažman <gasper.azman_at_[hidden]>
Date: Wed, 8 Dec 2021 18:23:22 +0000
The problem with using `auto` in that space is that std::vector has a
`typename` in that space.

`auto` is for NTTPs.

On Wed, Dec 8, 2021 at 6:18 PM Ville Voutilainen via Std-Proposals <
std-proposals_at_[hidden]> wrote:

> 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.
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>

Received on 2021-12-08 12:23:35