stdex Additional custom or not Standard C++ covered algorithms

Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
stdex::ref_unique_ptr< T, D > Class Template Reference

Helper class for returning pointers to std::unique_ptr. More...

`#include <stdex/memory.hpp>`

## Public Member Functions
| ref_unique_ptr (std::unique_ptr< T, D > &owner)
| Takes ownership of the pointer.
| ref_unique_ptr (ref_unique_ptr< T, D > &&other)
| Moves object.
| ~ref_unique_ptr ()
| Returns ownership of the pointer.
| operator T** ()
| Operator for pointer-to-pointer parameters by value use-cases.
| operator T*& ()
| Operator for reverence-to-pointer parameters by value use-cases.

## Protected Attributes
std::unique_ptr< T, D > & | m_own
| Original owner of the pointer.
T * | m_ptr
| Pointer.

## Detailed Description

template<typename T, typename D>
class stdex::ref_unique_ptr< T, D >

Helper class for returning pointers to std::unique_ptr.

## Constructor & Destructor Documentation

## ◆ ref_unique_ptr() [1/2]

template<typename T , typename D >

stdex::ref_unique_ptr< T, D >::ref_unique_ptr | ( | std::unique_ptr< T, D > & | owner | ) |
| inline

Takes ownership of the pointer.

Parameters

  [in,out] | owner | Object to attach helper to

## ◆ ref_unique_ptr() [2/2]

template<typename T , typename D >

stdex::ref_unique_ptr< T, D >::ref_unique_ptr | ( | ref_unique_ptr< T, D > && | other | ) |
| inline

Moves object.

Parameters

  [in,out] | other | Source object

## Member Function Documentation

## ◆ operator T*&()

template<typename T , typename D >

stdex::ref_unique_ptr< T, D >::operator T*& | ( |  | ) |
| inline

Operator for reverence-to-pointer parameters by value use-cases.

Returns
  Reference to the pointer

## ◆ operator T**()

template<typename T , typename D >

stdex::ref_unique_ptr< T, D >::operator T** | ( |  | ) |
| inline

Operator for pointer-to-pointer parameters by value use-cases.

Returns
  Pointer to the pointer

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

- include/stdex/memory.hpp