Loading...
Searching...
No Matches
Catch::Detail::unique_ptr< T > Class Template Reference

`#include <catch_amalgamated.hpp>`

## Public Member Functions

constexpr | unique_ptr (std::nullptr_t=nullptr)
constexpr | unique_ptr (T *ptr)
template<typename U, typename = std::enable_if_t<std::is_base_of<T, U>::value>>
| unique_ptr (unique_ptr< U > &&from)
template<typename U, typename = std::enable_if_t<std::is_base_of<T, U>::value>>
unique_ptr & | operator= (unique_ptr< U > &&from)
| unique_ptr (unique_ptr const &)=delete
unique_ptr & | operator= (unique_ptr const &)=delete
| unique_ptr (unique_ptr &&rhs) noexcept
unique_ptr & | operator= (unique_ptr &&rhs) noexcept
| ~unique_ptr ()
T & | operator* ()
T const & | operator* () const
T * | operator-> () noexcept
T const * | operator-> () const noexcept
T * | get ()
T const * | get () const
void | reset (T *ptr=nullptr)
T * | release ()
| operator bool () const

## Private Attributes

T * | m_ptr

## Friends

void | swap (unique_ptr &lhs, unique_ptr &rhs)

## Detailed Description

template<typename T>
class Catch::Detail::unique_ptr< T >

A reimplementation of `std::unique_ptr` for improved compilation performance

Does not support arrays nor custom deleters.

## Constructor & Destructor Documentation

## unique_ptr() [1/5]

template<typename T>

Catch::Detail::unique_ptr< T >::unique_ptr | ( | std::nullptr_t | = nullptr | ) |

inlineconstexpr

## unique_ptr() [2/5]

template<typename T>

Catch::Detail::unique_ptr< T >::unique_ptr | ( | T * | ptr | ) |

inlineexplicitconstexpr

## unique_ptr() [3/5]

template<typename T>
template<typename U, typename = std::enable_if_t<std::is_base_of<T, U>::value>>

Catch::Detail::unique_ptr< T >::unique_ptr | ( | unique_ptr< U > && | from | ) |

inline

## unique_ptr() [4/5]

template<typename T>

Catch::Detail::unique_ptr< T >::unique_ptr | ( | unique_ptr< T > const & |  | ) |

delete

## unique_ptr() [5/5]

template<typename T>

Catch::Detail::unique_ptr< T >::unique_ptr | ( | unique_ptr< T > && | rhs | ) |

inlinenoexcept

## ~unique_ptr()

template<typename T>

Catch::Detail::unique_ptr< T >::~unique_ptr | ( |  | ) |

inline

## Member Function Documentation

## get() [1/2]

template<typename T>

T * Catch::Detail::unique_ptr< T >::get | ( |  | ) |

inline

## get() [2/2]

template<typename T>

T const * Catch::Detail::unique_ptr< T >::get | ( |  | ) | const

inline

## operator bool()

template<typename T>

Catch::Detail::unique_ptr< T >::operator bool | ( |  | ) | const

inlineexplicit

## operator*() [1/2]

template<typename T>

T & Catch::Detail::unique_ptr< T >::operator* | ( |  | ) |

inline

## operator*() [2/2]

template<typename T>

T const & Catch::Detail::unique_ptr< T >::operator* | ( |  | ) | const

inline

## operator->() [1/2]

template<typename T>

T const * Catch::Detail::unique_ptr< T >::operator-> | ( |  | ) | const

inlinenoexcept

## operator->() [2/2]

template<typename T>

T * Catch::Detail::unique_ptr< T >::operator-> | ( |  | ) |

inlinenoexcept

## operator=() [1/3]

template<typename T>

unique_ptr & Catch::Detail::unique_ptr< T >::operator= | ( | unique_ptr< T > && | rhs | ) |

inlinenoexcept

## operator=() [2/3]

template<typename T>

unique_ptr & Catch::Detail::unique_ptr< T >::operator= | ( | unique_ptr< T > const & |  | ) |

delete

## operator=() [3/3]

template<typename T>
template<typename U, typename = std::enable_if_t<std::is_base_of<T, U>::value>>

unique_ptr & Catch::Detail::unique_ptr< T >::operator= | ( | unique_ptr< U > && | from | ) |

inline

## release()

template<typename T>

T * Catch::Detail::unique_ptr< T >::release | ( |  | ) |

inline

## reset()

template<typename T>

void Catch::Detail::unique_ptr< T >::reset | ( | T * | ptr = nullptr | ) |

inline

Here is the caller graph for this function:

## Friends And Related Symbol Documentation

## swap

template<typename T>

void swap | ( | unique_ptr< T > & | lhs,
|  | unique_ptr< T > & | rhs )

friend

## Member Data Documentation

## m_ptr

template<typename T>

T* Catch::Detail::unique_ptr< T >::m_ptr

private

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

- tests/vendor/catch_amalgamated.hpp