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

An empty class that can't be copied (moving is allowed). More...

#include <UncopiableAndUnmovableClass.h>

Inheritance diagram for lar::UncopiableClass:
lar::UncopiableAndUnmovableClass sbn::details::TriggerResponseManager sbn::details::TriggerResponseManager icarus::trigger::MajorityTriggerSimulation icarus::trigger::SlidingWindowTriggerSimulation icarus::trigger::TriggerSimulationOnGates lar::example::ShowerCalibrationGalore lariov::ChannelStatusProvider lariov::DetPedestalProvider lariov::ElectronicsCalibProvider lariov::ElectronLifetimeProvider lariov::PmtGainProvider MyOtherProvider MyProvider svc::ProviderA svc::ProviderB svc::ProviderD YetAnotherProvider

Public Member Functions

 UncopiableClass ()=default
 Default constructor. More...
 
 ~UncopiableClass ()=default
 Default destructor. More...
 
 UncopiableClass (UncopiableClass const &)=delete
 Deleted copy and move constructors and assignments. More...
 
 UncopiableClass (UncopiableClass &&)=default
 
UncopiableClassoperator= (UncopiableClass const &)=delete
 
UncopiableClassoperator= (UncopiableClass &&)=default
 

Detailed Description

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)
: UncopiableClass() // , ...
{
// ...
}
};

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

struct CopyAssignableClass: protected UncopiableClass {
CopyAssignableClass& operator= (CopyAssignableClass const& from)
{
// ...
return *this;
}
};

Definition at line 72 of file UncopiableAndUnmovableClass.h.

Constructor & Destructor Documentation

lar::UncopiableClass::UncopiableClass ( )
default

Default constructor.

lar::UncopiableClass::UncopiableClass ( UncopiableClass const &  )
delete

Deleted copy and move constructors and assignments.

lar::UncopiableClass::UncopiableClass ( UncopiableClass &&  )
default
lar::UncopiableClass::~UncopiableClass ( )
default

Default destructor.

Member Function Documentation

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

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