This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/16053] Fails to identify overload


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]