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

stl_relops.h collision conflict


Hello,

I'm writing an ET library. Unfortunally I'm gone into trouble
with the stl internal header stl_relops.h from gcc:

template <class _Tp>
inline bool operator>(const _Tp& __x, const _Tp& __y) {
  return __y < __x;
}

and my:

template<class T1, class T2, size_t Sz>
inline
Xpr<
  XprBinOp<
    VectorReference<T1, Sz>,
    Functional::Greater<T1, T2>,
    VectorReference<T2, Sz>
  >
>
operator>(const Vector<T1, Sz>& lhs, const Vector<T2, Sz>& rhs) {
  typedef XprBinOp<
    VectorReference<T1, Sz>,
    Functional::Greater<T1, T2>,
    VectorReference<T2, Sz>
    >                                                   expr_type;
  return Xpr<expr_type>(expr_type(lhs.ref(), rhs.ref()));
}

Is there no way to force the compiler to use my implementation of
operator>() ? 

On gcc-3.0.1 the relops header has an own inner namespace but, the problems
has been occoured in prior version as well. Is there a work around ?

Thanks
Olaf


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