Date: Thu, 21 Nov 2024 00:08:30 +0100
> No, p3 doesn't allow the second `auto`. I'm not sure how you can read it
that way.
> Each of p2-p7 defines a *context* in which placeholders are legal;
> it doesn't define the legality of the entire construct in which the
placeholder appears.
> The context that is made legal by p3 is the one occupied by the first
`auto`, namely the decl-specifier-seq,
> so it says nothing about the legality of the second `auto`.
> It only means that, if there's no trailing return type present at all,
> then p3 doesn't give any permission for a placeholder to appear in the
decl-specifier-seq.
I see your point, ok. I was likely biased by the old text of C++20
(reported in the original post 2710)
but it is useless to discuss it now, as it cannot change.
Thank you.
> As to your second point, I'm not sure which p1 you're referring to.
> The text you quote, "or as one of the type-specifiers in a
trailing-return-type",
> does not appear in [dcl.spec.auto.general]/1
<https://eel.is/c++draft/dcl.spec.auto.general#1>.
About second point, my bad, I meant p2, sorry for having written p1.
> As to your third point, are you suggesting that in that one comment we
> should use the hyphenated spelling?
> Or do you want to change other comments to say "trailing return type"?
About third point, it might just be fixed adding dashes;
trailing-return-type,
for the sake of uniformity with all other points in the standard.
I guess it worth doing it only together any other needed change, not alone.
Hope not to abuse your patience, I would have another point around this
standard clauses,
that I was first checking on the web, for which I also posted on
stackoverflow today
(
https://stackoverflow.com/questions/79208177/multiple-occurrences-of-placeholder-type-auto-in-a-type
)
without getting any concrete answer. It is related about the plural words
"the occurrences" in [dcl.type.auto.deduct]-p3.
You can read there my question.
>
that way.
> Each of p2-p7 defines a *context* in which placeholders are legal;
> it doesn't define the legality of the entire construct in which the
placeholder appears.
> The context that is made legal by p3 is the one occupied by the first
`auto`, namely the decl-specifier-seq,
> so it says nothing about the legality of the second `auto`.
> It only means that, if there's no trailing return type present at all,
> then p3 doesn't give any permission for a placeholder to appear in the
decl-specifier-seq.
I see your point, ok. I was likely biased by the old text of C++20
(reported in the original post 2710)
but it is useless to discuss it now, as it cannot change.
Thank you.
> As to your second point, I'm not sure which p1 you're referring to.
> The text you quote, "or as one of the type-specifiers in a
trailing-return-type",
> does not appear in [dcl.spec.auto.general]/1
<https://eel.is/c++draft/dcl.spec.auto.general#1>.
About second point, my bad, I meant p2, sorry for having written p1.
> As to your third point, are you suggesting that in that one comment we
> should use the hyphenated spelling?
> Or do you want to change other comments to say "trailing return type"?
About third point, it might just be fixed adding dashes;
trailing-return-type,
for the sake of uniformity with all other points in the standard.
I guess it worth doing it only together any other needed change, not alone.
Hope not to abuse your patience, I would have another point around this
standard clauses,
that I was first checking on the web, for which I also posted on
stackoverflow today
(
https://stackoverflow.com/questions/79208177/multiple-occurrences-of-placeholder-type-auto-in-a-type
)
without getting any concrete answer. It is related about the plural words
"the occurrences" in [dcl.type.auto.deduct]-p3.
You can read there my question.
>
Received on 2024-11-20 23:08:43