Boost logo

Boost :

From: Bjorn.Karlsson_at_[hidden]
Date: 2002-06-17 15:19:20

One requirement for comparing boost::arrays is that the element types match
exactly, like so:

template<class T, std::size_t N>
    bool operator== (const array<T,N>& x, const array<T,N>& y)

I find it reasonable to allow comparisons of arrays with compatible types,
which the following signature allows:

template<class T,std::size_t N,class U>
  bool operator==(const array<T,N>& x,const array<U,N>& y)

Is there a reason for not doing it this way?


Boost list run by bdawes at, gregod at, cpdaniel at, john at