Re: [PATCH] c++: Handle auto(x) in parameter-declaration-clause [PR103401]

2021-12-02 Thread Jason Merrill via Gcc-patches
On 12/2/21 10:27, Marek Polacek wrote: On Wed, Dec 01, 2021 at 11:24:58PM -0500, Jason Merrill wrote: On 12/1/21 10:16, Marek Polacek wrote: In C++23, auto(x) is valid, so decltype(auto(x)) should also be valid, so void f(decltype(auto(0))); should be just as void f(int); but

Re: [PATCH] c++: Handle auto(x) in parameter-declaration-clause [PR103401]

2021-12-02 Thread Marek Polacek via Gcc-patches
On Wed, Dec 01, 2021 at 11:24:58PM -0500, Jason Merrill wrote: > On 12/1/21 10:16, Marek Polacek wrote: > > In C++23, auto(x) is valid, so decltype(auto(x)) should also be valid, > > so > > > >void f(decltype(auto(0))); > > > > should be just as > > > >void f(int); > > > > but

Re: [PATCH] c++: Handle auto(x) in parameter-declaration-clause [PR103401]

2021-12-01 Thread Jason Merrill via Gcc-patches
On 12/1/21 10:16, Marek Polacek wrote: In C++23, auto(x) is valid, so decltype(auto(x)) should also be valid, so void f(decltype(auto(0))); should be just as void f(int); but currently, everytime we see 'auto' in a parameter-declaration-clause, we try to

[PATCH] c++: Handle auto(x) in parameter-declaration-clause [PR103401]

2021-12-01 Thread Marek Polacek via Gcc-patches
In C++23, auto(x) is valid, so decltype(auto(x)) should also be valid, so void f(decltype(auto(0))); should be just as void f(int); but currently, everytime we see 'auto' in a parameter-declaration-clause, we try to synthesize_implicit_template_parm for it, creating a new template