c++/8702: [3.3 regression] matching of conversion operators
bangerth@dealii.org
bangerth@dealii.org
Mon Nov 25 10:53:00 GMT 2002
Old Synopsis: gcc 3.3: "error: template definition of non-template"
New Synopsis: [3.3 regression] matching of conversion operators
State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Mon Nov 25 09:15:52 2002
State-Changed-Why:
True. It's a regression on mainline. Here's a reduced
testcase:
------------------------------------
template <typename X> struct C1{};
template <typename X>
struct C2 {
template<typename Y> operator C1<Y>();
template<typename Y> operator C2<Y>();
};
template<typename X> template<typename Y>
C2<X>::operator C1<Y>()
{
return C1<Y>();
}
---------------------------------
gcc3.3 complains when seeing the definition of the
conversion operator.It is apparently confused by the
second conversion operator, since if I remove that
declaration, everything is fine. 3.2.1 and 2.95 accept
the code as is.
More on conversion operators and templates:
PRs 383, 8572, 8578
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8702
More information about the Gcc-bugs
mailing list