3 ms·
Personally I would use a macro such as: #define DISALLOW_COPY_AND_ASSIGN(TypeName) \ TypeName(TypeName&) = delete; \ void operator=(Ty
by quinnftw 10y ago
Personally I would use a macro such as:
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
TypeName(TypeName&) = delete; \
void operator=(TypeName) = delete;
Introducing a virtual base class for disabling copying introduces a vtable and un-needed inheritance.