Boost logo

Boost :

From: Douglas Gregor (gregod_at_[hidden])
Date: 2002-06-18 20:02:57

On Monday 17 June 2002 04:19 pm, Bjorn.Karlsson_at_[hidden] wrote:
> 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?
> Bjorn

The STL containers also have this restriction, so I can only assume that the
restriction was inherited.


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