This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
RE: c++/3979: An update to problem #3971
- To: "'lerdsuwa at gcc dot gnu dot org'" <lerdsuwa at gcc dot gnu dot org>, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, Dennis Kennedy <kennedy at roguewave dot com>, nobody at gcc dot gnu dot org
- Subject: RE: c++/3979: An update to problem #3971
- From: Dennis Kennedy <kennedy at roguewave dot com>
- Date: Fri, 10 Aug 2001 08:47:10 -0700
Why does the conversion from A<T> to B<T> fail?? In class B there is the
conversion operator:
B(const A<T> &X ) : A<T>(X) {;}
Thanks,
Dennis
-----Original Message-----
From: lerdsuwa@gcc.gnu.org [mailto:lerdsuwa@gcc.gnu.org]
Sent: Friday, August 10, 2001 7:20 AM
To: gcc-bugs@gcc.gnu.org; gcc-prs@gcc.gnu.org; kennedy@roguewave.com;
nobody@gcc.gnu.org
Subject: Re: c++/3979: An update to problem #3971
Synopsis: An update to problem #3971
State-Changed-From-To: open->closed
State-Changed-By: lerdsuwa
State-Changed-When: Fri Aug 10 07:20:00 2001
State-Changed-Why:
Not a bug. The only possible match (using template
argument deduction rule) is:
template< class T>
inline A<T> operator *(const A<T> &a, const A<T> &b);
and the conversion from B<T> to A<T> fails. The function
template< class T>
inline B<T> operator *(const B<T> &a, const B<T> &b);
is not considered (See section 14.8.2.1 para 3 in the
standard).
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3979&database=gcc