[PATCH] c++: permit deduction guides at class scope [PR79501]

2021-07-09 Thread Patrick Palka via Gcc-patches
This adds support for declaring (class-scope) deduction guides for a member class template. Fortunately it seems only a couple of changes are needed in order for the existing CTAD machinery to handle them like any other deduction guide: we need to make sure to give them a FUNCTION_TYPE instead of

Re: [PATCH] c++: permit deduction guides at class scope [PR79501]

2021-07-09 Thread Jason Merrill via Gcc-patches
On 7/9/21 3:18 PM, Patrick Palka wrote: This adds support for declaring (class-scope) deduction guides for a member class template. Fortunately it seems only a couple of changes are needed in order for the existing CTAD machinery to handle them like any other deduction guide: we need to make sur

Re: [PATCH] c++: permit deduction guides at class scope [PR79501]

2021-07-09 Thread Patrick Palka via Gcc-patches
On Fri, 9 Jul 2021, Jason Merrill wrote: > On 7/9/21 3:18 PM, Patrick Palka wrote: > > This adds support for declaring (class-scope) deduction guides for a > > member class template. Fortunately it seems only a couple of changes > > are needed in order for the existing CTAD machinery to handle th

Re: [PATCH] c++: permit deduction guides at class scope [PR79501]

2021-07-09 Thread Patrick Palka via Gcc-patches
On Fri, 9 Jul 2021, Patrick Palka wrote: > On Fri, 9 Jul 2021, Jason Merrill wrote: > > > On 7/9/21 3:18 PM, Patrick Palka wrote: > > > This adds support for declaring (class-scope) deduction guides for a > > > member class template. Fortunately it seems only a couple of changes > > > are needed

Re: [PATCH] c++: permit deduction guides at class scope [PR79501]

2021-07-09 Thread Marek Polacek via Gcc-patches
On Fri, Jul 09, 2021 at 04:18:34PM -0400, Patrick Palka via Gcc-patches wrote: > > > > --- a/gcc/cp/name-lookup.c > > > > +++ b/gcc/cp/name-lookup.c > > > > @@ -7110,9 +7110,14 @@ lookup_qualified_name (tree scope, tree name, > > > > LOOK_want want, bool complain) > > > > else if (cxx_dialect !

Re: [PATCH] c++: permit deduction guides at class scope [PR79501]

2021-07-09 Thread Jason Merrill via Gcc-patches
On 7/9/21 4:18 PM, Patrick Palka wrote: On Fri, 9 Jul 2021, Patrick Palka wrote: On Fri, 9 Jul 2021, Jason Merrill wrote: On 7/9/21 3:18 PM, Patrick Palka wrote: This adds support for declaring (class-scope) deduction guides for a member class template. Fortunately it seems only a couple of

Re: [PATCH] c++: permit deduction guides at class scope [PR79501]

2021-07-09 Thread Patrick Palka via Gcc-patches
On Fri, 9 Jul 2021, Jason Merrill wrote: > On 7/9/21 4:18 PM, Patrick Palka wrote: > > On Fri, 9 Jul 2021, Patrick Palka wrote: > > > > > On Fri, 9 Jul 2021, Jason Merrill wrote: > > > > > > > On 7/9/21 3:18 PM, Patrick Palka wrote: > > > > > This adds support for declaring (class-scope) deducti

Re: [PATCH] c++: permit deduction guides at class scope [PR79501]

2021-07-12 Thread Jason Merrill via Gcc-patches
On 7/9/21 6:41 PM, Patrick Palka wrote: On Fri, 9 Jul 2021, Jason Merrill wrote: On 7/9/21 4:18 PM, Patrick Palka wrote: On Fri, 9 Jul 2021, Patrick Palka wrote: On Fri, 9 Jul 2021, Jason Merrill wrote: On 7/9/21 3:18 PM, Patrick Palka wrote: This adds support for declaring (class-scope)