Non-copyable Mixin. More...
#include <NonCopyable.h>
Protected Member Functions | |
NonCopyable () | |
Constructor. | |
~NonCopyable () | |
Destructor. | |
Private Member Functions | |
NonCopyable (const NonCopyable &) | |
NonCopyable & | operator= (const NonCopyable &) |
Non-copyable Mixin.
This mix-in class prevents objects of a class from being copy-constructed or assigned to each other. User can prohibit the class copying by inheriting from NonCopyable class as a private base class.
-example: class CopyProhibitedClass : private NonCopyable {};
This mix-in class prevents objects of a class from being copy-constructed or assigned to each other. User can prohibit the class copying by inheriting from NonCopyable class as a private base class.ĦĦThe CRTP (Curiously Recursive Template Pattern) version would be used for empty base optimization for multipe-inherited.
-example: class CopyProhibitedClass : private NonCopyable {};
Definition at line 49 of file NonCopyable.h.
coil::NonCopyable::NonCopyable | ( | ) | [inline, protected] |
coil::NonCopyable::~NonCopyable | ( | ) | [inline, protected] |
coil::NonCopyable::NonCopyable | ( | const NonCopyable & | ) | [private] |
NonCopyable& coil::NonCopyable::operator= | ( | const NonCopyable & | ) | [private] |