Ring Daemon 16.0.0
|
Simple macro to hide class' copy constructor and assignment operator. More...
Go to the source code of this file.
Macros | |
#define | NON_COPYABLE(ClassName) |
Simple macro to hide class' copy constructor and assignment operator.
Useful to avoid shallow copying (i.e. classes with pointer members) Usage: For a class named MyClass, the macro call NON_COPYABLE(MyClass) should go in the private section of MyClass WARNING: Since C++11 using this macro make the class also non-movable by default! You shall re-implement yourself (or at least using declare with =default) move-constructor and move-assignable function members if they are needed.
Definition in file noncopyable.h.
#define NON_COPYABLE | ( | ClassName | ) |
Definition at line 30 of file noncopyable.h.