This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/16053] Fails to identify overload
- From: "lerdsuwa at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Jul 2004 15:10:53 -0000
- Subject: [Bug c++/16053] Fails to identify overload
- References: <20040618112043.16053.igodard@pacbell.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From lerdsuwa at gcc dot gnu dot org 2004-07-11 15:10 -------
There are 2 functions involved here:
1. template <typename U> void operator<< (A<int> &, const U &);
which is generated by the compiler when instantiating A<int>.
2. template<typename T> void operator<< (A<T> &, const B &);
So you have ambiguity here.
Note that the template friend does not mean this function:
template <typename T, typename U> void operator<< (A<T> &, const U &);
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16053