Re: [PATCH] c++: adc_unify deduction with constrained auto [PR99365]

2021-03-05 Thread Jason Merrill via Gcc-patches
check whether the constraint is dependent during adc_variable_type and adc_return_type deduction. I think that might be straightforward; I'll try it. I'll also experiment with the hacky workaround mentioned earlier. Here's a patch that incorporates these two ideas: -- >8 -

Re: [PATCH] c++: adc_unify deduction with constrained auto [PR99365]

2021-03-05 Thread Patrick Palka via Gcc-patches
iff --git a/gcc/cp/pt.c b/gcc/cp/pt.c > > > > > > index a4686e0affb..ce537e4529a 100644 > > > > > > --- a/gcc/cp/pt.c > > > > > > +++ b/gcc/cp/pt.c > > > > > > @@ -23693,7 +23693,8 @@ unify (tree tparms, tree targs, tree p

Re: [PATCH] c++: adc_unify deduction with constrained auto [PR99365]

2021-03-05 Thread Jason Merrill via Gcc-patches
nk that might be straightforward; I'll try it. I'll also experiment with the hacky workaround mentioned earlier. Here's a patch that incorporates these two ideas: -- >8 -- Subject: [PATCH] c++: adc_unify deduction with constrained auto [PR99365] My recent r11-7454

Re: [PATCH] c++: adc_unify deduction with constrained auto [PR99365]

2021-03-04 Thread Patrick Palka via Gcc-patches
gt; > > @@ -29619,13 +29620,21 @@ do_auto_deduction (tree type, tree init, tree > > > > auto_node, > > > > } > > > > /* Check any placeholder constraints against the deduced type. */ > > > > - if (flag_concepts) > > > > -

Re: [PATCH] c++: adc_unify deduction with constrained auto [PR99365]

2021-03-04 Thread Patrick Palka via Gcc-patches
On Thu, 4 Mar 2021, Patrick Palka wrote: > On Thu, 4 Mar 2021, Jason Merrill wrote: > > > On 3/4/21 11:32 AM, Patrick Palka wrote: > > > On Thu, 4 Mar 2021, Patrick Palka wrote: > > > > > > > My recent r11-7454 changed the way do_auto_deduction handles constrained > > > > placeholders during tem

Re: [PATCH] c++: adc_unify deduction with constrained auto [PR99365]

2021-03-04 Thread Patrick Palka via Gcc-patches
On Thu, 4 Mar 2021, Jason Merrill wrote: > On 3/4/21 11:32 AM, Patrick Palka wrote: > > On Thu, 4 Mar 2021, Patrick Palka wrote: > > > > > My recent r11-7454 changed the way do_auto_deduction handles constrained > > > placeholders during template argument deduction (context == adc_unify) > > > wh

Re: [PATCH] c++: adc_unify deduction with constrained auto [PR99365]

2021-03-04 Thread Jason Merrill via Gcc-patches
On 3/4/21 11:32 AM, Patrick Palka wrote: On Thu, 4 Mar 2021, Patrick Palka wrote: My recent r11-7454 changed the way do_auto_deduction handles constrained placeholders during template argument deduction (context == adc_unify) when processing_template_decl != 0. Before the patch, when processin

Re: [PATCH] c++: adc_unify deduction with constrained auto [PR99365]

2021-03-04 Thread Patrick Palka via Gcc-patches
On Thu, 4 Mar 2021, Patrick Palka wrote: > My recent r11-7454 changed the way do_auto_deduction handles constrained > placeholders during template argument deduction (context == adc_unify) > when processing_template_decl != 0. > > Before the patch, when processing_template_decl != 0 we would just

[PATCH] c++: adc_unify deduction with constrained auto [PR99365]

2021-03-04 Thread Patrick Palka via Gcc-patches
My recent r11-7454 changed the way do_auto_deduction handles constrained placeholders during template argument deduction (context == adc_unify) when processing_template_decl != 0. Before the patch, when processing_template_decl != 0 we would just ignore the constraints on the placeholder in this s