xentara-utils v2.0.4
The Xentara Utility Library
Loading...
Searching...
No Matches
xentara::utils::tools::DisableCopy Class Reference

A class that can be neither copied nor moved. More...

#include <xentara/utils/tools/DisableCopy.hpp>

+ Inheritance diagram for xentara::utils::tools::DisableCopy:

Public Member Functions

constexpr DisableCopy () noexcept=default
 Default constructor.
 
 DisableCopy (const DisableCopy &)=delete
 Deleted copy constructor.
 
DisableCopyoperator= (const DisableCopy &)=delete
 Deleted assignment operator.
 

Detailed Description

A class that can be neither copied nor moved.

This is an empty class with deleted copy and move constructors and assignment operators. You can derive from this class to easily make a class unmovable and uncopyable.

Constructor & Destructor Documentation

◆ DisableCopy() [1/2]

constexpr xentara::utils::tools::DisableCopy::DisableCopy ( )
constexprdefaultnoexcept

Default constructor.

◆ DisableCopy() [2/2]

xentara::utils::tools::DisableCopy::DisableCopy ( const DisableCopy )
delete

Deleted copy constructor.

Member Function Documentation

◆ operator=()

DisableCopy & xentara::utils::tools::DisableCopy::operator= ( const DisableCopy )
delete

Deleted assignment operator.