VC6移植到VS2010下编译通不过

我从CArray派生了一个CArrayGraph2来定义二维数组
并且也重载operator=,

然后
typedef CArray ARRINT;
typedef CArrayGraph2 ARRINT2;

定义了一个ARRINT2作为int类型的二维数组,但在函数里只要
一调用该数组的RemoveAll就编译通不过,不晓得是哪有问题,
但是在VC6下,或者在VS2010正常项目下都可以编译通过,
仅仅在动态库工程里编译通不过

动态库里 定义了一个函数
TESTARRAY_API int fntestarray(ARRINT2& arrInterIndex)
{
arrInterIndex.RemoveAll();//把该行屏蔽就可以编译通过
return 0;
}
https://pan.baidu.com/s/1boBOiZX 这里可以下载工程源码

报错信息如下:
d:\program files\microsoft visual studio 10.0\vc\atlmfc\include\afxtempl.h(262): error C2248: “CObject::operator =”: 无法访问 private 成员(在“CObject”类中声明)
1> d:\program files\microsoft visual studio 10.0\vc\atlmfc\include\afx.h(535) : 参见“CObject::operator =”的声明
1> d:\program files\microsoft visual studio 10.0\vc\atlmfc\include\afx.h(509) : 参见“CObject”的声明
1> 此诊断出现在编译器生成的函数“CArray &CArray::operator =(const CArray &)”中
1> with
1> [
1> TYPE=int,
1> ARG_TYPE=int
1> ]

至少把报错信息发一下呀,提示的什么?

\program files\microsoft visual studio 10.0\vc\atlmfc\include\afxtempl.h(262): error C2248: “CObject::operator =”: 无法访问 private 成员(在“CObject”类中声明)
1> d:\program files\microsoft visual studio 10.0\vc\atlmfc\include\afx.h(535) : 参见“CObject::operator =”的声明
1> d:\program files\microsoft visual studio 10.0\vc\atlmfc\include\afx.h(509) : 参见“CObject”的声明
1> 此诊断出现在编译器生成的函数“CArray &CArray::operator =(const CArray &)”中
1> with
1> [
1> TYPE=int,
1> ARG_TYPE=int
1> ]

好像是提示需要重载operator =,但是实际已经重载了呢

#include

template
class AFX_EXT_CLASS CArrayGraph2 : public CArray
{
public:
void operator=(const CArrayGraph2 &rhs);

};

typedef CArray ARRINT;
typedef CArrayGraph2 ARRINT2;

template
void CArrayGraph2::operator=(const CArrayGraph2 &rhs)
{
RemoveAll();
Append(rhs);
FreeExtra();
}

TESTARRAY_API int fntestarray(ARRINT2& arrInterIndex)
{
arrInterIndex.RemoveAll();//该行屏蔽就可以编译通过,不屏蔽就报以上错误

return 0;

}