Iros
 
Loading...
Searching...
No Matches
di::any::UniqueStorage< Alloc > Struct Template Reference

#include <di/any/storage/unique_storage.h>

Public Types

using Manage = meta::Type<detail::UniqueStorageManage<UniqueStorage, Alloc>>
 
using Interface = meta::List<Manage>
 
template<typename>
using CreationResult = meta::AllocatorResult<Alloc>
 

Public Member Functions

 UniqueStorage ()=default
 
 UniqueStorage (UniqueStorage const &)=default
 
auto operator= (UniqueStorage const &) -> UniqueStorage &=default
 
 ~UniqueStorage ()=default
 
template<typename T>
constexpr auto down_cast () -> T *
 
template<typename T>
constexpr auto down_cast () const -> T const *
 

Static Public Member Functions

static constexpr auto storage_category () -> StorageCategory
 
template<typename T>
static constexpr auto creation_is_fallible (InPlaceType< T >) -> bool
 
template<typename Any, typename T, typename... Args>
requires (concepts::ConstructibleFrom<T, Args...> && creation_is_fallible(in_place_type<T>))
static constexpr void create (InPlaceType< Any >, meta::LikeExpected< CreationResult< T >, Any > &self, InPlaceType< T >, Args &&... args)
 
template<typename T, typename... Args>
requires (concepts::ConstructibleFrom<T, Args...>)
static constexpr auto init (UniqueStorage *self, InPlaceType< T >, Args &&... args)
 
static constexpr void move_construct (concepts::VTableFor< Interface > auto &vtable, UniqueStorage *dest, UniqueStorage *source)
 
template<concepts::VTableFor< Interface > VTable>
static constexpr void move_assign (VTable &dest_vtable, UniqueStorage *dest, VTable &source_vtable, UniqueStorage *source)
 
static constexpr void destroy (concepts::VTableFor< Interface > auto &vtable, UniqueStorage *self)
 

Member Typedef Documentation

◆ CreationResult

template<concepts::Allocator Alloc = platform::DefaultAllocator>
template<typename>
using di::any::UniqueStorage< Alloc >::CreationResult = meta::AllocatorResult<Alloc>

◆ Interface

template<concepts::Allocator Alloc = platform::DefaultAllocator>
using di::any::UniqueStorage< Alloc >::Interface = meta::List<Manage>

◆ Manage

template<concepts::Allocator Alloc = platform::DefaultAllocator>
using di::any::UniqueStorage< Alloc >::Manage = meta::Type<detail::UniqueStorageManage<UniqueStorage, Alloc>>

Constructor & Destructor Documentation

◆ UniqueStorage() [1/2]

template<concepts::Allocator Alloc = platform::DefaultAllocator>
di::any::UniqueStorage< Alloc >::UniqueStorage ( )
default

◆ UniqueStorage() [2/2]

template<concepts::Allocator Alloc = platform::DefaultAllocator>
di::any::UniqueStorage< Alloc >::UniqueStorage ( UniqueStorage< Alloc > const & )
default

◆ ~UniqueStorage()

template<concepts::Allocator Alloc = platform::DefaultAllocator>
di::any::UniqueStorage< Alloc >::~UniqueStorage ( )
default

Member Function Documentation

◆ create()

template<concepts::Allocator Alloc = platform::DefaultAllocator>
template<typename Any, typename T, typename... Args>
requires (concepts::ConstructibleFrom<T, Args...> && creation_is_fallible(in_place_type<T>))
static constexpr void di::any::UniqueStorage< Alloc >::create ( InPlaceType< Any > ,
meta::LikeExpected< CreationResult< T >, Any > & self,
InPlaceType< T > ,
Args &&... args )
inlinestaticconstexpr

◆ creation_is_fallible()

template<concepts::Allocator Alloc = platform::DefaultAllocator>
template<typename T>
static constexpr auto di::any::UniqueStorage< Alloc >::creation_is_fallible ( InPlaceType< T > ) -> bool
inlinestaticconstexpr

◆ destroy()

template<concepts::Allocator Alloc = platform::DefaultAllocator>
static constexpr void di::any::UniqueStorage< Alloc >::destroy ( concepts::VTableFor< Interface > auto & vtable,
UniqueStorage< Alloc > * self )
inlinestaticconstexpr

◆ down_cast() [1/2]

template<concepts::Allocator Alloc = platform::DefaultAllocator>
template<typename T>
auto di::any::UniqueStorage< Alloc >::down_cast ( ) -> T*
inlineconstexpr

◆ down_cast() [2/2]

template<concepts::Allocator Alloc = platform::DefaultAllocator>
template<typename T>
auto di::any::UniqueStorage< Alloc >::down_cast ( ) const -> T const*
inlineconstexpr

◆ init()

template<concepts::Allocator Alloc = platform::DefaultAllocator>
template<typename T, typename... Args>
requires (concepts::ConstructibleFrom<T, Args...>)
static constexpr auto di::any::UniqueStorage< Alloc >::init ( UniqueStorage< Alloc > * self,
InPlaceType< T > ,
Args &&... args )
inlinestaticconstexpr

◆ move_assign()

template<concepts::Allocator Alloc = platform::DefaultAllocator>
template<concepts::VTableFor< Interface > VTable>
static constexpr void di::any::UniqueStorage< Alloc >::move_assign ( VTable & dest_vtable,
UniqueStorage< Alloc > * dest,
VTable & source_vtable,
UniqueStorage< Alloc > * source )
inlinestaticconstexpr

◆ move_construct()

template<concepts::Allocator Alloc = platform::DefaultAllocator>
static constexpr void di::any::UniqueStorage< Alloc >::move_construct ( concepts::VTableFor< Interface > auto & vtable,
UniqueStorage< Alloc > * dest,
UniqueStorage< Alloc > * source )
inlinestaticconstexpr

◆ operator=()

template<concepts::Allocator Alloc = platform::DefaultAllocator>
auto di::any::UniqueStorage< Alloc >::operator= ( UniqueStorage< Alloc > const & ) -> UniqueStorage &=default
default

◆ storage_category()

template<concepts::Allocator Alloc = platform::DefaultAllocator>
static constexpr auto di::any::UniqueStorage< Alloc >::storage_category ( ) -> StorageCategory
inlinestaticconstexpr

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