HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Types | Public Member Functions
tt::weak_or_unique_ptr< T > Class Template Reference

#include <ttauri/weak_or_unique_ptr.hpp>

Public Types

using value_type = T
 
using pointer = value_type *
 

Public Member Functions

constexpr weak_or_unique_ptr (std::nullptr_t) noexcept
 
weak_or_unique_ptroperator= (std::nullptr_t) noexcept
 
template<typename Y >
requires (std::is_convertible_v<std::remove_cvref_t<Y> *, value_type *>)
 weak_or_unique_ptr (weak_or_unique_ptr< Y > const &other) noexcept
 
template<typename Y >
requires (std::is_convertible_v<std::remove_cvref_t<Y> *, value_type *>)
weak_or_unique_ptroperator= (weak_or_unique_ptr< Y > const &other) noexcept
 
template<typename Y >
requires (std::is_convertible_v<std::remove_cvref_t<Y> *, value_type *>)
 weak_or_unique_ptr (weak_or_unique_ptr< Y > &&other) noexcept
 
template<typename Y >
requires (std::is_convertible_v<std::remove_cvref_t<Y> *, value_type *>)
weak_or_unique_ptroperator= (weak_or_unique_ptr< Y > &&other) noexcept
 
template<typename Y >
requires (std::is_convertible_v<std::remove_cvref_t<Y> *, value_type *>)
 weak_or_unique_ptr (std::unique_ptr< Y > &&other) noexcept
 
template<typename Y >
requires (std::is_convertible_v<std::remove_cvref_t<Y> *, value_type *>)
weak_or_unique_ptroperator= (std::unique_ptr< Y > &&other) noexcept
 
template<typename Y >
requires (std::is_convertible_v<std::remove_cvref_t<Y> *, value_type *>)
 weak_or_unique_ptr (std::shared_ptr< Y > const &other) noexcept
 
template<typename Y >
requires (std::is_convertible_v<std::remove_cvref_t<Y> *, value_type *>)
weak_or_unique_ptroperator= (std::shared_ptr< Y > const &other) noexcept
 
template<typename Y >
requires (std::is_convertible_v<std::remove_cvref_t<Y> *, value_type *>)
 weak_or_unique_ptr (std::weak_ptr< Y > const &other) noexcept
 
template<typename Y >
requires (std::is_convertible_v<std::remove_cvref_t<Y> *, value_type *>)
 weak_or_unique_ptr (std::weak_ptr< Y > &&other) noexcept
 
template<typename Y >
requires (std::is_convertible_v<std::remove_cvref_t<Y> *, value_type *>)
weak_or_unique_ptroperator= (std::weak_ptr< Y > const &other) noexcept
 
template<typename Y >
requires (std::is_convertible_v<std::remove_cvref_t<Y> *, value_type *>)
weak_or_unique_ptroperator= (std::weak_ptr< Y > &&other) noexcept
 
void reset () noexcept
 
bool expired () const noexcept
 
std::shared_ptr< value_type > lock () const noexcept
 

Detailed Description

template<typename T>
class tt::weak_or_unique_ptr< T >

Class that hold either a weak_ptr or a unique_ptr This class is to hold a weak_ptr, and potentially also an owning unique_ptr.

Technically this class will use a shared_ptr for owning.

The following unique_ptr, shared_ptr, weak_ptr or weak_or_unique_ptr conversions are allowed:


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