Effective implementation of algorithms (Master Thesis)
Effective and error-free implementation of algorithms
|
Go to the source code of this file.
Defines | |
#define | DISALLOW_EVIL_CONSTRUCTORS(type) |
#define DISALLOW_EVIL_CONSTRUCTORS | ( | type | ) |
void operator=(type const &); \ type(type const &);
This macro disallows "evil" constructors, i.e. defines constructors that are created implicitly and should not be. This is very useful if you are not intending to class be a copiable.
Warning: This macro will not define the constructors as private, you must put it into the right section! Note: not including in the private section will result to linking problems if the constructors are used.
correct usage: class MyClass { private: DISALLOW_EVIL_CONSTRUCTORS(MyClass) }