header_utils
Loading...
Searching...
No Matches
ghassanpl::unititialized_t< T > Union Template Reference

unititialized_t<T> is an appropriately sized and aligned storage for type T, with a useful interface to create and destroy the object More...

#include <uninitialized.h>

Public Member Functions

constexpr unititialized_t (default_init_t) noexcept(detail::nothrow_default_constructible< T >)
template<typename... Args>
requires detail::paren_constructible_from<T, Args...>
constexpr unititialized_t (paren_init_t, Args &&... args) noexcept(detail::nothrow_paren_constructible_from< T, Args... >)
template<typename... Args>
requires detail::brace_constructible_from<T, Args...>
constexpr unititialized_t (brace_init_t, Args &&... args) noexcept(detail::nothrow_brace_constructible_from< T, Args... >)
template<typename Self>
requires detail::default_constructible<T>
constexpr auto default_init (this Self &&self) noexcept(detail::nothrow_default_constructible< T >) -> T &
template<typename Self, typename... Args>
requires detail::paren_constructible_from<T, Args...>
constexpr auto paren_init (this Self &&self, Args &&... args) noexcept(detail::nothrow_paren_constructible_from< T, Args... >) -> T &
template<typename Self, typename... Args>
requires detail::brace_constructible_from<T, Args...>
constexpr auto brace_init (this Self &&self, Args &&... args) noexcept(detail::nothrow_brace_constructible_from< T, Args... >) -> T &
template<typename Self>
constexpr auto ptr (this Self &&self) noexcept -> auto *
template<typename Self>
constexpr auto operator-> (this Self &&self) noexcept -> auto *
template<typename Self>
constexpr auto ref (this Self &&self) noexcept -> auto &&
template<typename Self>
constexpr auto operator* (this Self &&self) noexcept -> auto &&
template<typename Self>
constexpr auto bytes (this Self &&self) noexcept -> std::ranges::borrowed_range auto
template<typename Self>
constexpr auto destroy (this Self &&self) noexcept(std::is_nothrow_destructible_v< T >)

Detailed Description

template<detail::sized T>
union ghassanpl::unititialized_t< T >

unititialized_t<T> is an appropriately sized and aligned storage for type T, with a useful interface to create and destroy the object

Definition at line 61 of file uninitialized.h.

Constructor & Destructor Documentation

◆ unititialized_t() [1/4]

template<detail::sized T>
ghassanpl::unititialized_t< T >::unititialized_t ( )
inlineconstexprnoexcept

Definition at line 64 of file uninitialized.h.

◆ unititialized_t() [2/4]

template<detail::sized T>
ghassanpl::unititialized_t< T >::unititialized_t ( default_init_t )
inlineexplicitconstexprnoexcept

Definition at line 66 of file uninitialized.h.

◆ unititialized_t() [3/4]

template<detail::sized T>
template<typename... Args>
requires detail::paren_constructible_from<T, Args...>
ghassanpl::unititialized_t< T >::unititialized_t ( paren_init_t ,
Args &&... args )
inlineexplicitconstexprnoexcept

Definition at line 74 of file uninitialized.h.

◆ unititialized_t() [4/4]

template<detail::sized T>
template<typename... Args>
requires detail::brace_constructible_from<T, Args...>
ghassanpl::unititialized_t< T >::unititialized_t ( brace_init_t ,
Args &&... args )
inlineexplicitconstexprnoexcept

Definition at line 82 of file uninitialized.h.

◆ ~unititialized_t()

template<detail::sized T>
ghassanpl::unititialized_t< T >::~unititialized_t ( )
inlineconstexpr

Definition at line 93 of file uninitialized.h.

Member Function Documentation

◆ brace_init()

template<detail::sized T>
template<typename Self, typename... Args>
requires detail::brace_constructible_from<T, Args...>
auto ghassanpl::unititialized_t< T >::brace_init ( this Self && self,
Args &&... args ) -> T &
inlineconstexprnoexcept

Definition at line 113 of file uninitialized.h.

◆ bytes()

template<detail::sized T>
template<typename Self>
auto ghassanpl::unititialized_t< T >::bytes ( this Self && self) -> std::ranges::borrowed_range auto
inlinenodiscardconstexprnoexcept

Definition at line 146 of file uninitialized.h.

◆ default_init()

template<detail::sized T>
template<typename Self>
requires detail::default_constructible<T>
auto ghassanpl::unititialized_t< T >::default_init ( this Self && self) -> T &
inlineconstexprnoexcept

Definition at line 96 of file uninitialized.h.

◆ destroy()

template<detail::sized T>
template<typename Self>
auto ghassanpl::unititialized_t< T >::destroy ( this Self && self)
inlineconstexprnoexcept

Definition at line 159 of file uninitialized.h.

◆ operator*()

template<detail::sized T>
template<typename Self>
auto ghassanpl::unititialized_t< T >::operator* ( this Self && self) -> auto &&
inlinenodiscardconstexprnoexcept

Definition at line 140 of file uninitialized.h.

◆ operator->()

template<detail::sized T>
template<typename Self>
auto ghassanpl::unititialized_t< T >::operator-> ( this Self && self) -> auto *
inlinenodiscardconstexprnoexcept

Definition at line 128 of file uninitialized.h.

◆ paren_init()

template<detail::sized T>
template<typename Self, typename... Args>
requires detail::paren_constructible_from<T, Args...>
auto ghassanpl::unititialized_t< T >::paren_init ( this Self && self,
Args &&... args ) -> T &
inlineconstexprnoexcept

Definition at line 104 of file uninitialized.h.

◆ ptr()

template<detail::sized T>
template<typename Self>
auto ghassanpl::unititialized_t< T >::ptr ( this Self && self) -> auto *
inlinenodiscardconstexprnoexcept

Definition at line 122 of file uninitialized.h.

◆ ref()

template<detail::sized T>
template<typename Self>
auto ghassanpl::unititialized_t< T >::ref ( this Self && self) -> auto &&
inlinenodiscardconstexprnoexcept

Definition at line 134 of file uninitialized.h.