guanaqo 1.0.0-alpha.24
Utilities for scientific software
Loading...
Searching...
No Matches
guanaqo::copyable_unique_ptr< T > Struct Template Reference

#include <guanaqo/copyable-unique_ptr.hpp>

Detailed Description

template<class T>
struct guanaqo::copyable_unique_ptr< T >

std::unique_ptr is move-only, this class wraps such a pointer and provides copy operations as well.

Definition at line 15 of file copyable-unique_ptr.hpp.

Collaboration diagram for guanaqo::copyable_unique_ptr< T >:

Public Member Functions

 copyable_unique_ptr (std::unique_ptr< T > ptr)
 copyable_unique_ptr ()=default
 copyable_unique_ptr (const copyable_unique_ptr &o)
copyable_unique_ptroperator= (const copyable_unique_ptr &o)
 copyable_unique_ptr (copyable_unique_ptr &&) noexcept=default
copyable_unique_ptroperator= (copyable_unique_ptr &&) noexcept=default
 operator std::unique_ptr< T > & () &
 operator const std::unique_ptr< T > & () const &
 operator std::unique_ptr< T > && () &&
std::unique_ptr< T > & operator-> ()
const std::unique_ptr< T > & operator-> () const
auto & operator* ()
auto & operator* () const

Public Attributes

std::unique_ptr< T > ptr

Constructor & Destructor Documentation

◆ copyable_unique_ptr() [1/4]

template<class T>
guanaqo::copyable_unique_ptr< T >::copyable_unique_ptr ( std::unique_ptr< T > ptr)
inline

Definition at line 16 of file copyable-unique_ptr.hpp.

Here is the caller graph for this function:

◆ copyable_unique_ptr() [2/4]

template<class T>
guanaqo::copyable_unique_ptr< T >::copyable_unique_ptr ( )
default

◆ copyable_unique_ptr() [3/4]

template<class T>
guanaqo::copyable_unique_ptr< T >::copyable_unique_ptr ( const copyable_unique_ptr< T > & o)
inline

Definition at line 18 of file copyable-unique_ptr.hpp.

Here is the call graph for this function:

◆ copyable_unique_ptr() [4/4]

template<class T>
guanaqo::copyable_unique_ptr< T >::copyable_unique_ptr ( copyable_unique_ptr< T > && )
defaultnoexcept
Here is the call graph for this function:

Member Function Documentation

◆ operator=() [1/2]

template<class T>
copyable_unique_ptr & guanaqo::copyable_unique_ptr< T >::operator= ( const copyable_unique_ptr< T > & o)
inline

Definition at line 20 of file copyable-unique_ptr.hpp.

Here is the call graph for this function:

◆ operator=() [2/2]

template<class T>
copyable_unique_ptr & guanaqo::copyable_unique_ptr< T >::operator= ( copyable_unique_ptr< T > && )
defaultnoexcept
Here is the call graph for this function:

◆ operator std::unique_ptr< T > &()

template<class T>
guanaqo::copyable_unique_ptr< T >::operator std::unique_ptr< T > & ( ) &
inline

Definition at line 27 of file copyable-unique_ptr.hpp.

◆ operator const std::unique_ptr< T > &()

template<class T>
guanaqo::copyable_unique_ptr< T >::operator const std::unique_ptr< T > & ( ) const &
inline

Definition at line 28 of file copyable-unique_ptr.hpp.

◆ operator std::unique_ptr< T > &&()

template<class T>
guanaqo::copyable_unique_ptr< T >::operator std::unique_ptr< T > && ( ) &&
inline

Definition at line 29 of file copyable-unique_ptr.hpp.

◆ operator->() [1/2]

template<class T>
std::unique_ptr< T > & guanaqo::copyable_unique_ptr< T >::operator-> ( )
inline

Definition at line 31 of file copyable-unique_ptr.hpp.

◆ operator->() [2/2]

template<class T>
const std::unique_ptr< T > & guanaqo::copyable_unique_ptr< T >::operator-> ( ) const
inline

Definition at line 32 of file copyable-unique_ptr.hpp.

◆ operator*() [1/2]

template<class T>
auto & guanaqo::copyable_unique_ptr< T >::operator* ( )
inline

Definition at line 33 of file copyable-unique_ptr.hpp.

◆ operator*() [2/2]

template<class T>
auto & guanaqo::copyable_unique_ptr< T >::operator* ( ) const
inline

Definition at line 34 of file copyable-unique_ptr.hpp.

Member Data Documentation

◆ ptr

template<class T>
std::unique_ptr<T> guanaqo::copyable_unique_ptr< T >::ptr

Definition at line 36 of file copyable-unique_ptr.hpp.


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