I want class B to inherit everything except a few methods of class A (which are supposed to be trivially copied) and can still be trivially copied. In C ++ 11, I can remove methods. Take for example:
class A {
public:
A& operator += (const A&);
};
class B: public A {
public:
B& operator += (const A&) = delete;
};
Is B trivially copied? I know that there are problems with deleting special methods, but compound assignment is not a special method (right?).
source
share