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

bangerth@dealii.org bangerth@dealii.org
Mon Mar 31 16:10:00 GMT 2003


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



More information about the Gcc-prs mailing list