This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/33807] Incorrect ambiguous overload
- From: "bldantes at comcast dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Oct 2007 16:40:43 -0000
- Subject: [Bug libstdc++/33807] Incorrect ambiguous overload
- References: <bug-33807-15234@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from bldantes at comcast dot net 2007-10-18 16:40 -------
Why does adding the new libstdc++ template function:
template<typename _Tp>
inline bool operator!=(const allocator<_Tp>&, const allocator<_Tp>&);
fix the conflict between my template function:
template <class T>
bool operator != (const T& x, const T& y);
and the existing libstdc++ template function:
template<typename _T1, typename _T2>
inline bool operator!=(const allocator<_T1>&, const allocator<_T2>&);
???
Before the addition of the new template function, it seems like the conflict in
the first place is just wrong. The compiler should pick the existing one in
libstdc++ over mine because it more closely matches the type, no?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33807