All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
lar::PolymorphicUnmovableClass Struct Reference

An empty polymorphic class that can't be moved (copy is allowed). More...

#include <UncopiableAndUnmovableClass.h>

Inheritance diagram for lar::PolymorphicUnmovableClass:
lar::PolymorphicClass lar::PolymorphicUncopiableAndUnmovableClass

Public Member Functions

 PolymorphicUnmovableClass ()=default
 
 PolymorphicUnmovableClass (PolymorphicUnmovableClass const &)=default
 
 PolymorphicUnmovableClass (PolymorphicUnmovableClass &&)=delete
 
PolymorphicUnmovableClassoperator= (PolymorphicUnmovableClass const &)=default
 
PolymorphicUnmovableClassoperator= (PolymorphicUnmovableClass &&)=delete
 
- Public Member Functions inherited from lar::PolymorphicClass
 PolymorphicClass ()=default
 
virtual ~PolymorphicClass ()=default
 

Detailed Description

An empty polymorphic class that can't be moved (copy is allowed).

See Also
PolymorphicClass, PolymorphicUncopiableClass, PolymorphicUncopiableAndUnmovableClass

A class derived from this one can still be moved with an explicit effort. For example, to enable move construction:

struct MoveableClass: protected PolymorphicUnmovableClass {
MoveableClass(MoveableClass&& from)
{
// ...
}
};

the default constructor of the base class can be called explicitly instead of the move constructor. To provide a move assignment operation,

struct MoveAssignableClass: protected PolymorphicUnmovableClass {
MoveAssignableClass& operator= (MoveAssignableClass&& from)
{
// ...
return *this;
}
};

Definition at line 281 of file UncopiableAndUnmovableClass.h.

Constructor & Destructor Documentation

lar::PolymorphicUnmovableClass::PolymorphicUnmovableClass ( )
default
lar::PolymorphicUnmovableClass::PolymorphicUnmovableClass ( PolymorphicUnmovableClass const &  )
default
lar::PolymorphicUnmovableClass::PolymorphicUnmovableClass ( PolymorphicUnmovableClass &&  )
delete

Member Function Documentation

PolymorphicUnmovableClass& lar::PolymorphicUnmovableClass::operator= ( PolymorphicUnmovableClass const &  )
default
PolymorphicUnmovableClass& lar::PolymorphicUnmovableClass::operator= ( PolymorphicUnmovableClass &&  )
delete

The documentation for this struct was generated from the following file: