Patch for constexpr variable templates
Andrew Sutton
andrew.n.sutton@gmail.com
Thu Aug 7 13:41:00 GMT 2014
>> * decl.c (cp_finish_decl): Don't check the initializer if it is
>> value-dependent.
>
>
> Why is this needed?
I thought that check_initializer was evaluating the constant
expression, and was resulting in errors because a template-id
referring to a variable template with a concrete type wasn't being
marked as dependent.
Taking a second look, this change doesn't appear to be needed. The
change to lookup_template_variable seems to do enough. I just reran
the tests and it seems to behave correctly without it.
Andrew
More information about the Gcc-patches
mailing list