[var-template] Accept variable template declaration

Jason Merrill jason@redhat.com
Mon Apr 1 20:58:00 GMT 2013


On 04/01/2013 04:53 PM, Gabriel Dos Reis wrote:
> On Sun, Mar 31, 2013 at 12:13 AM, Jason Merrill <jason@redhat.com> wrote:
>>
>> On 03/29/2013 10:56 PM, Gabriel Dos Reis wrote:
>>>
>>>     int wanted = num_template_headers_for_class (ctx);
>>
>> I think you want to add one to wanted if decl is a primary template.
>
> OK but I am a little bit dense here: why is that necessary?

By 'primary' I mean something that is itself a template, not just a 
member of a class template.  Previously variables couldn't be primary 
templates, but I believe your proposal is to change that; in that case, 
we should expect to see a template header for such a template, in 
addition to any headers for enclosing classes.

Jason



More information about the Gcc-patches mailing list