Boost logo

Boost :

From: Valentin Bonnard (Bonnard.V_at_[hidden])
Date: 2000-08-01 11:30:16


Mark Rodgers wrote:

> Is there anything wrong with
>
> template <typename T2>
> array &operator=(const array<T2,N> &rhs) {
> std::copy(rhs.begin(),rhs.end(), begin());
> return *this;
> }
>
> This works for me. Of course, because rhs may be of a
> different type,

If operator= is called with the operator syntax (a = b),
then types _must_ be differents.

-- 
Valentin Bonnard

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk