
Boost.Array defines an assignement operator with the following prototype template<typename T, std::size_t N> class array { public: /... template<typename U> array& operator=(const array<U, N>& rhs); // Effects:std::copy(rhs.begin(),rhs.end(), begin()) }; I was wondering if this can be extended to manage with arrays of different sizes, having as effect the copying of the minimum of N and M elements from the source to the target. template<typename T, std::size_t N> class array { public: /... template<typename U, std::size_t M> array& operator=(const array<U, M>& rhs); // Effects:std::copy(rhs.begin(),rhs.begin()+min(N,M), begin()) }; Is there anything wrong with this interface? Best, _____________________ Vicente Juan Botet Escribá