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

A class that can be moved but not copied. More...

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

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

Public Member Functions

constexpr Unique () noexcept=default
 Default constructor.
 
constexpr Unique (Unique &&) noexcept=default
 Move constructor.
 
constexpr Uniqueoperator= (Unique &&) noexcept=default
 Move assignment operator.
 
 Unique (const Unique &)=delete
 Deleted copy constructor.
 
Uniqueoperator= (const Unique &)=delete
 Deleted assignment operator.
 

Detailed Description

A class that can be moved but not copied.

This is an empty class with deleted copy constructor and assignment operator. You can derive from this class to easily make a class uncopyable.

Constructor & Destructor Documentation

◆ Unique() [1/3]

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

Default constructor.

◆ Unique() [2/3]

constexpr xentara::utils::tools::Unique::Unique ( Unique &&  )
constexprdefaultnoexcept

Move constructor.

◆ Unique() [3/3]

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

Deleted copy constructor.

Member Function Documentation

◆ operator=() [1/2]

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

Deleted assignment operator.

◆ operator=() [2/2]

constexpr Unique & xentara::utils::tools::Unique::operator= ( Unique &&  )
constexprdefaultnoexcept

Move assignment operator.