Re: 2 C++ PATCHes for c++/67411 (const var in generic lambda)

2015-12-20 Thread Jason Merrill
On 12/20/2015 01:51 PM, Jakub Jelinek wrote: Shouldn't this be DECL_HAS_VALUE_EXPR_P (decl) instead? Good point. Fixed. Jason

Re: 2 C++ PATCHes for c++/67411 (const var in generic lambda)

2015-12-20 Thread Jakub Jelinek
On Sun, Dec 20, 2015 at 01:34:51PM -0500, Jason Merrill wrote: > commit 6804dee422ff9a85298a24ae0912e82ed0d7e988 > Author: Jason Merrill > Date: Thu Dec 17 15:41:32 2015 -0500 > > PR c++/67411 > > * decl2.c (decl_maybe_constant_var_p): A proxy isn't constant. > > diff --git a/

2 C++ PATCHes for c++/67411 (const var in generic lambda)

2015-12-20 Thread Jason Merrill
Our treatment of references to outer const variables in lambdas has been to defer deciding whether or not to capture them until instantiation time, at which point their initializers will have been processed. But that doesn't work for generic lambdas, since by the time we instantiate the lambda