Re: [PATCH] c++: CTAD and forwarding references [PR88252]

2021-07-14 Thread Jason Merrill via Gcc-patches
On 7/14/21 1:52 PM, Patrick Palka wrote: On Wed, 14 Jul 2021, Jason Merrill wrote: On 7/14/21 11:26 AM, Patrick Palka wrote: Here we're incorrectly treating T&& as a forwarding reference during CTAD even though T is a template parameter of the class template. This happens because the

Re: [PATCH] c++: CTAD and forwarding references [PR88252]

2021-07-14 Thread Patrick Palka via Gcc-patches
On Wed, 14 Jul 2021, Jason Merrill wrote: > On 7/14/21 11:26 AM, Patrick Palka wrote: > > Here we're incorrectly treating T&& as a forwarding reference during > > CTAD even though T is a template parameter of the class template. > > > > This happens because the template parameter T in the

Re: [PATCH] c++: CTAD and forwarding references [PR88252]

2021-07-14 Thread Jason Merrill via Gcc-patches
On 7/14/21 11:26 AM, Patrick Palka wrote: Here we're incorrectly treating T&& as a forwarding reference during CTAD even though T is a template parameter of the class template. This happens because the template parameter T in the out-of-line definition of the constructor doesn't have the flag

[PATCH] c++: CTAD and forwarding references [PR88252]

2021-07-14 Thread Patrick Palka via Gcc-patches
Here we're incorrectly treating T&& as a forwarding reference during CTAD even though T is a template parameter of the class template. This happens because the template parameter T in the out-of-line definition of the constructor doesn't have the flag TEMPLATE_TYPE_PARM_FOR_CLASS set, and during