An empty class that can't be copied (moving is allowed).
- See also
UnmovableClass
, UncopiableAndUnmovableClass
A class derived from this one can still be copied with an explicit effort. For example, to enable copy construction:
struct CopiableClass: protected UncopiableAndUnmovableClass {
CopiableClass(CopiableClass const& from)
{
}
};
the default constructor of the base class can be called explicitly instead of the copy constructor. To provide an assignment operation,
CopyAssignableClass&
operator= (CopyAssignableClass
const& from)
{
return *this;
}
};
Definition at line 72 of file UncopiableAndUnmovableClass.h.