This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch for constexpr variable templates


>>          * 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]