Re: [PATCH] c++: Don't substitute into constraints on lambdas [PR99874]

2021-04-09 Thread Jason Merrill via Gcc-patches
On 4/8/21 5:01 PM, Patrick Palka wrote: On Thu, 8 Apr 2021, Jason Merrill wrote: On 4/7/21 12:10 PM, Patrick Palka wrote: We currently substitute through a lambda's constraints whenever we regenerate it via tsubst_lambda_expr. This is the wrong approach because it can lead to hard errors due

Re: [PATCH] c++: Don't substitute into constraints on lambdas [PR99874]

2021-04-08 Thread Patrick Palka via Gcc-patches
On Thu, 8 Apr 2021, Jason Merrill wrote: > On 4/7/21 12:10 PM, Patrick Palka wrote: > > We currently substitute through a lambda's constraints whenever we > > regenerate it via tsubst_lambda_expr. This is the wrong approach > > because it can lead to hard errors due to constraints being evaluated

Re: [PATCH] c++: Don't substitute into constraints on lambdas [PR99874]

2021-04-08 Thread Jason Merrill via Gcc-patches
On 4/7/21 12:10 PM, Patrick Palka wrote: We currently substitute through a lambda's constraints whenever we regenerate it via tsubst_lambda_expr. This is the wrong approach because it can lead to hard errors due to constraints being evaluated out of order (as in the testcase concepts-lambda17.C

[PATCH] c++: Don't substitute into constraints on lambdas [PR99874]

2021-04-07 Thread Patrick Palka via Gcc-patches
We currently substitute through a lambda's constraints whenever we regenerate it via tsubst_lambda_expr. This is the wrong approach because it can lead to hard errors due to constraints being evaluated out of order (as in the testcase concepts-lambda17.C below), and because it doesn't mesh well wi