c++/9783: Can't forward reference class in argument to templated method.
bangerth@dealii.org
bangerth@dealii.org
Thu Feb 20 23:57:00 GMT 2003
Synopsis: Can't forward reference class in argument to templated method.
State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Thu Feb 20 23:57:45 2003
State-Changed-Why:
Confirmed. Here's a simpler testcase:
--------------------------
template <typename T>
struct C {
void foo (struct X *);
};
struct X {};
template <typename T>
void C<T>::foo(struct X *) {}
-------------------------------
It's rejected by all versions of gcc. However, if
one makes C a non-template, then it is accepted. Strange.
I suspect that the language actually mandates this behavior,
since both icc and cxx (well, both EDG based after all)
have this behavior as well. I don't know what is right in
this case.
W.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9783
More information about the Gcc-bugs
mailing list