This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/10273: g++ fails to compile sort() with a template operator that takes a pointer
- From: bangerth at dealii dot org
- To: darrenr at optimation dot com dot au, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org
- Date: 31 Mar 2003 15:59:41 -0000
- Subject: Re: c++/10273: g++ fails to compile sort() with a template operator that takes a pointer
- Reply-to: bangerth at dealii dot org, darrenr at optimation dot com dot au, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
Synopsis: g++ fails to compile sort() with a template operator that takes a pointer
State-Changed-From-To: open->closed
State-Changed-By: bangerth
State-Changed-When: Mon Mar 31 15:59:41 2003
State-Changed-Why:
Not a bug, but for a different reason than what Gaby
suspected. This
template <class ClassName *> struct xLess
is indeed a valid template declaration, since a class named
"ClassName" has been declared previously, but it is a
template with a value-parameter, not a type-parameter.
Once you change that, change some pointers to values
and make ClassName::x public, the code compiles.
W.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10273