[C++ Patch] PR 58102 aka DR 1405

Jason Merrill jason@redhat.com
Tue Sep 2 15:45:00 GMT 2014

On 09/02/2014 11:07 AM, Paolo Carlini wrote:
> Anyway, what about the below? Certainly works for the tests which we
> have got.

Hmm.  This is definitely an improvement, as it allows a subset of

a non-volatile glvalue of literal type that refers to a non-volatile 
object whose lifetime began within the evalution of e

But it doesn't cover all of that, and in any case we shouldn't need to 
explicitly handle that just for types with mutable subobjects.

I think perhaps it would be better to remove that hunk as in your 
initial patch and replace it with a check in constant_value_1 and an 
explanation in non_const_var_error.


More information about the Gcc-patches mailing list