Any idea why declaring a const int inside a data member of a class would cause error C2582: 'operator =' function is unavailable in 'CMyClass'?
There is a lot going on in CMyClass and I don't know where to start looking for the error. I am using the default operator= . The simplified version below compiles just fine. The real version has hundreds of lines of code, and works without errors (except when the member class declares a const object). So strange.
VS2010
class A
{
public:
A():x(0){}
A(int x): x(x){}
const int x;
};
class CMyClass
{
A m_A;
};