Title
Name hiding and template template-parameters
Status
open
Section
13.8.2 [temp.local]
Submitter
John Spicer

Created on 1999-11-11.00:00:00 last changed 304 months ago

Messages

Date: 2004-09-10.00:00:00

The standard prohibits a class template from having the same name as one of its template parameters (13.8.2 [temp.local] paragraph 4) . This prohibits

    template <class X> class X;
for the reason that the template name would hide the parameter, and such hiding is in general prohibited.

Presumably, we should also prohibit

    template <template <class T> class T> struct A;
for the same reason.
History
Date User Action Args
1999-11-11 00:00:00admincreate