MCRO
C++23 utilities for Unreal Engine.
Loading...
Searching...
No Matches
Mcro::Construct::TInitializeOnCopy< T > Struct Template Reference

#include <Construct.h>

Public Member Functions

 TInitializeOnCopy ()
 
 TInitializeOnCopy (TInitializeOnCopy const &)
 
 TInitializeOnCopy (TInitializeOnCopy &&) noexcept
 
auto operator= (TInitializeOnCopy const &) -> TInitializeOnCopy &
 
auto operator= (TInitializeOnCopy &&other) noexcept -> TInitializeOnCopy &
 
T * operator-> ()
 
const T * operator-> () const
 
T & Get ()
 
const T & Get () const
 
template<typename Self >
 operator typename TCopyQualifiersFromTo< Self, T & >::Type (this Self &&self)
 

Data Fields

TUniqueObj< T > Value
 

Detailed Description

template<CDefaultInitializable T>
requires (!CCopyable<T>)
struct Mcro::Construct::TInitializeOnCopy< T >

A type wrapper around a default initializeable object which may not be copyable but which needs to be a member of a copyable class. On each instance of such class the wrapped value may not need to be copied and default constructing it is enough. Useful for mutexes for example.

Definition at line 100 of file Construct.h.

Constructor & Destructor Documentation

◆ TInitializeOnCopy() [1/3]

template<CDefaultInitializable T>
Mcro::Construct::TInitializeOnCopy< T >::TInitializeOnCopy ( )
inline

Definition at line 102 of file Construct.h.

◆ TInitializeOnCopy() [2/3]

template<CDefaultInitializable T>
Mcro::Construct::TInitializeOnCopy< T >::TInitializeOnCopy ( TInitializeOnCopy< T > const & )
inline

Definition at line 103 of file Construct.h.

◆ TInitializeOnCopy() [3/3]

template<CDefaultInitializable T>
Mcro::Construct::TInitializeOnCopy< T >::TInitializeOnCopy ( TInitializeOnCopy< T > && )
inlinenoexcept

Definition at line 104 of file Construct.h.

Member Function Documentation

◆ Get() [1/2]

template<CDefaultInitializable T>
T & Mcro::Construct::TInitializeOnCopy< T >::Get ( )
inline

Definition at line 113 of file Construct.h.

◆ Get() [2/2]

template<CDefaultInitializable T>
const T & Mcro::Construct::TInitializeOnCopy< T >::Get ( ) const
inline

Definition at line 114 of file Construct.h.

◆ operator typename TCopyQualifiersFromTo< Self, T & >::Type()

template<CDefaultInitializable T>
template<typename Self >
Mcro::Construct::TInitializeOnCopy< T >::operator typename TCopyQualifiersFromTo< Self, T & >::Type ( this Self && self)
inline

Definition at line 117 of file Construct.h.

◆ operator->() [1/2]

template<CDefaultInitializable T>
T * Mcro::Construct::TInitializeOnCopy< T >::operator-> ( )
inline

Definition at line 110 of file Construct.h.

◆ operator->() [2/2]

template<CDefaultInitializable T>
const T * Mcro::Construct::TInitializeOnCopy< T >::operator-> ( ) const
inline

Definition at line 111 of file Construct.h.

◆ operator=() [1/2]

template<CDefaultInitializable T>
auto Mcro::Construct::TInitializeOnCopy< T >::operator= ( TInitializeOnCopy< T > && other) -> TInitializeOnCopy&
inlinenoexcept

Definition at line 106 of file Construct.h.

◆ operator=() [2/2]

template<CDefaultInitializable T>
auto Mcro::Construct::TInitializeOnCopy< T >::operator= ( TInitializeOnCopy< T > const & ) -> TInitializeOnCopy&
inline

Definition at line 105 of file Construct.h.

Field Documentation

◆ Value

template<CDefaultInitializable T>
TUniqueObj<T> Mcro::Construct::TInitializeOnCopy< T >::Value

Definition at line 108 of file Construct.h.


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