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 libstdc++/33807] Incorrect ambiguous overload



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


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