Topic: Member templates' template-parameter(s) being hidden
Author: stephen.clamage@sun.com (Steve Clamage)
Date: Thu, 5 Feb 2004 22:10:29 +0000 (UTC) Raw View
Michael Mellor wrote:
> I am led to believe by:
> "http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13967"
> that the following should be illegal:
>
> struct X {
> int C;
>
> template<class C>
> void func() {
> C c; // should be an error: C is not a type.
> }
> };
>
> but 14.6.1/5 states "In the definition of a member of a class
> template..." and does not mention member templates.
>
> Has this been discussed before? am I miss interpreting the standard? is
> there any defect report to cover it? or should the program infact be legal?
>
This question is currently being actively discussed in the C++ Committee.
No resolution yet.
--
Steve Clamage, stephen.clamage@sun.com
---
[ 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://www.jamesd.demon.co.uk/csc/faq.html ]
Author: news-at-@michaelmellor-dot-.com (Michael Mellor)
Date: Tue, 3 Feb 2004 18:27:56 +0000 (UTC) Raw View
I am led to believe by:
"http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13967"
that the following should be illegal:
struct X {
int C;
template<class C>
void func() {
C c; // should be an error: C is not a type.
}
};
but 14.6.1/5 states "In the definition of a member of a class
template..." and does not mention member templates.
Has this been discussed before? am I miss interpreting the standard? is
there any defect report to cover it? or should the program infact be legal?
Michael Mellor
---
[ 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://www.jamesd.demon.co.uk/csc/faq.html ]