LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
|
An empty class that can't be copied nor moved. More...
#include "UncopiableAndUnmovableClass.h"
Public Member Functions | |
UncopiableAndUnmovableClass ()=default | |
Default constructor. More... | |
~UncopiableAndUnmovableClass ()=default | |
Default destructor. More... | |
UncopiableAndUnmovableClass (UncopiableAndUnmovableClass const &)=delete | |
Deleted copy and move constructors and assignments. More... | |
UncopiableAndUnmovableClass (UncopiableAndUnmovableClass &&)=delete | |
Deleted copy and move constructors and assignments. More... | |
UncopiableAndUnmovableClass & | operator= (UncopiableAndUnmovableClass const &)=delete |
Deleted copy and move constructors and assignments. More... | |
UncopiableAndUnmovableClass & | operator= (UncopiableAndUnmovableClass &&)=delete |
Deleted copy and move constructors and assignments. More... | |
An empty class that can't be copied nor moved.
A class derived from this one can still be copied (or moved) with an explicit effort. For example, to enable copy construction:
struct CopiableClass: protected UncopiableAndUnmovableClass { CopiableClass(CopiableClass const& from) : UncopiableAndUnmovableClass() // , ... { // ... } };
the default constructor of the base class can be called explicitly instead of the copy constructor. To provide an assignment operation,
struct MoveAssignableClass: protected UncopiableAndUnmovableClass { MoveAssignableClass& operator= (MoveAssignableClass&& from) { // ... return *this; } };
Definition at line 43 of file UncopiableAndUnmovableClass.h.
|
default |
Default constructor.
|
delete |
Deleted copy and move constructors and assignments.
|
delete |
Deleted copy and move constructors and assignments.
|
default |
Default destructor.
|
delete |
Deleted copy and move constructors and assignments.
|
delete |
Deleted copy and move constructors and assignments.