关于operator=的有关问题

关于operator=的问题求助
数据结构与算法一书中定义了:"matrix.h"内容如下

#ifndef MATRIX_H
#define MATRIX_H
#include <vector>
using namespace std;
template <typename Object>
class matrix
{
public:
matrix( int rows, int cols ) : array( rows )
{
for( int i = 0; i < rows; i++ )
array[i].resize( cols );
}
const vector<Object> & operator[] ( int row ) const 
{
return array[ row ];
}
vector<Object> & operator[] ( int row )
{
return array[ row ];
}
int numrows() const
{
return array.size();
}
int numcols() const
{
return numrows() ? array[0].size() : 0;
}
private:
vector< vector<Object> > array;
};
#endif

自己写了一个测试程序:
#include "matrix.h"
#include <vector>
#include <iostream>
using namespace std;

void copy(const matrix<int> & from, const matrix<int> & to)
{
for(int i = 0; i <to.numrows(); i ++)
to[i] = from[i]; //该行报错
}

int main()
{
matrix<int> m1(3,5);
matrix<int> m2(3,5);

cout<<"The rows number of m1: "<<m1.numrows()<<endl;
cout<<"The cols number of m1: "<<m1.numrows()<<endl;
cout<<"The rows number of m2: "<<m2.numrows()<<endl;
cout<<"The cols number of m2: "<<m2.numrows()<<endl;

copy(m1, m2);

cout<<"After copy()..."<<endl;

cout<<"The rows number of m1: "<<m1.numrows()<<endl;
cout<<"The cols number of m1: "<<m1.numrows()<<endl;
cout<<"The rows number of m2: "<<m2.numrows()<<endl;
cout<<"The cols number of m2: "<<m2.numrows()<<endl;

return 0;
}
其中的copy()函数也是书中定义。但是编译的时候报错:
test.cpp(9) : error C2678: binary '=' : no operator defined which takes a left-hand operand of type 'const class std::vector<int,class std::allocator<int> >' (or there is no acceptable conversion)
执行 cl.exe 时出错.

但是根据"matrix.h"的定义from[i]和to[i]都是vector类型的,应该可以用"="赋值的啊。
不知道是怎么回事,请求高手解答。


------解决方案--------------------
copy(const matrix<int> & from, const matrix<int> & to)
两个参数都是const,const是不能作为左值的
改成这样吧:
copy(const matrix<int> & from, matrix<int> & to)