This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: c++/10273: g++ fails to compile sort() with a template operator that takes a pointer


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
> 
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]