This is the mail archive of the gcc-help@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]

Re: Ambiguous conversion with gcc 3.3/3.4


Hi Olivier,

What purpose do these serve...
template<typename T> bool operator ==(const T *left ,const
_NULL_PTPL_RUNTIME_ &right) {
   return (right.operator ==(left));
};

template<typename T> bool operator !=(const T *left ,const
_NULL_PTPL_RUNTIME_ &right) {
   return (right.operator !=(left));
};
...?

That functionality is already available in your class template through the auto-conversion in the operator T*. Which is going to lead to ambiguity.

--Eljay


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