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: "Darren Reed \(OSE\)" <darrenr at optimation dot com dot au>
- 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>
- Date: Tue, 1 Apr 2003 09:06:35 +1000
- Subject: RE: c++/10273: g++ fails to compile sort() with a template operator that takes a pointer
- >received: from excalibur (claret.mel.optimation.com.au) by optimation.com.au (5.0/OSE-3.1)for gcc-gnats@gcc.gnu.org id AA11909; Tue, 1 Apr 2003 09:14:21 +1000
Is it unreasonable to ask for a better error message in this case ?
Or perhaps better checking of templates ? (This would probably cause
a more accurate error message to be output.)
Darren
> -----Original Message-----
> From: bangerth at dealii dot org [mailto:bangerth at dealii dot org]
> Sent: Tuesday, 1 April 2003 2:00 AM
> 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
> Subject: Re: c++/10273: g++ fails to compile sort() with a template
> operator that takes a pointer
>
>
> 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
>
>