Topic: template parameters and elaborated type names
Author: "Spencer Simpson" <mapwiz@erols.com>
Date: 1998/05/08 Raw View
This is related to a posting I recently made on
comp.lang.c++.moderated.
Could someone please clarify whether the template parameter
in a template specialized with an enum-name has the status
of an enum-name, or is a typedef-name
(With an analogous result for class-name specializations)?
Section 14.1(2) of the Draft standard says that a template
parameter declared with class is introduced as a type-name
into that class's scope.
Section 7.1.5.2 (1) defines type-name as
class-name
enum-name
typedef-name
This could be interpreted to mean that in a template specialized
with an enum-name, the parameter is an enum-name;
in a template specialized with a class-name, the parameter is a
class-name;
and in a template specialized with any other type, a typedef-name.
I think this is the case because otherwise, 14.1(2) would have
used the term typedef-name instead of type-name.
Am I interpreting this correctly? Anyone?
Thanks in advance,
Spencer
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]