KTL
ktl::global< Alloc > Class Template Reference

#include <global.h>

Public Types

typedef detail::get_size_type_t< Alloc > size_type
 

Public Member Functions

 global () noexcept
 Constructor for forwarding any arguments to the underlying allocator. More...
 
 global (const global &other) noexcept
 
 global (global &&other) noexcept
 
globaloperator= (const global &rhs) noexcept
 
globaloperator= (global &&rhs) noexcept
 
bool operator== (const global &rhs) const
 
bool operator!= (const global &rhs) const
 
void * allocate (size_t n) noexcept(detail::has_nothrow_allocate_v< Alloc >)
 
void deallocate (void *p, size_t n) noexcept(detail::has_nothrow_deallocate_v< Alloc >)
 
template<typename T , typename... Args>
std::enable_if< detail::has_construct_v< Alloc, T *, Args... >, void >::type construct (T *p, Args &&... args) noexcept(detail::has_nothrow_construct_v< Alloc, T *, Args... >)
 
template<typename T >
std::enable_if< detail::has_destroy_v< Alloc, T * >, void >::type destroy (T *p) noexcept(detail::has_nothrow_destroy_v< Alloc, T * >)
 
template<typename A = Alloc>
std::enable_if< detail::has_max_size_v< A >, size_type >::type max_size () const noexcept(detail::has_nothrow_max_size_v< A >)
 
template<typename A = Alloc>
std::enable_if< detail::has_owns_v< A >, bool >::type owns (void *p) const noexcept(detail::has_nothrow_owns_v< A >)
 
void set_allocator (Alloc &&value) noexcept
 
Alloc & get_allocator () noexcept
 
const Alloc & get_allocator () const noexcept
 

Member Typedef Documentation

◆ size_type

template<typename Alloc >
typedef detail::get_size_type_t<Alloc> ktl::global< Alloc >::size_type

Constructor & Destructor Documentation

◆ global() [1/3]

template<typename Alloc >
ktl::global< Alloc >::global ( )
inlinenoexcept

Constructor for forwarding any arguments to the underlying allocator.

◆ global() [2/3]

template<typename Alloc >
ktl::global< Alloc >::global ( const global< Alloc > &  other)
inlinenoexcept

◆ global() [3/3]

template<typename Alloc >
ktl::global< Alloc >::global ( global< Alloc > &&  other)
inlinenoexcept

Member Function Documentation

◆ allocate()

template<typename Alloc >
void* ktl::global< Alloc >::allocate ( size_t  n)
inlinenoexcept

◆ construct()

template<typename Alloc >
template<typename T , typename... Args>
std::enable_if<detail::has_construct_v<Alloc, T*, Args...>, void>::type ktl::global< Alloc >::construct ( T *  p,
Args &&...  args 
)
inlinenoexcept

◆ deallocate()

template<typename Alloc >
void ktl::global< Alloc >::deallocate ( void *  p,
size_t  n 
)
inlinenoexcept

◆ destroy()

template<typename Alloc >
template<typename T >
std::enable_if<detail::has_destroy_v<Alloc, T*>, void>::type ktl::global< Alloc >::destroy ( T *  p)
inlinenoexcept

◆ get_allocator() [1/2]

template<typename Alloc >
const Alloc& ktl::global< Alloc >::get_allocator ( ) const
inlinenoexcept

◆ get_allocator() [2/2]

template<typename Alloc >
Alloc& ktl::global< Alloc >::get_allocator ( )
inlinenoexcept

◆ max_size()

template<typename Alloc >
template<typename A = Alloc>
std::enable_if<detail::has_max_size_v<A>, size_type>::type ktl::global< Alloc >::max_size ( ) const
inlinenoexcept

◆ operator!=()

template<typename Alloc >
bool ktl::global< Alloc >::operator!= ( const global< Alloc > &  rhs) const
inline

◆ operator=() [1/2]

template<typename Alloc >
global& ktl::global< Alloc >::operator= ( const global< Alloc > &  rhs)
inlinenoexcept

◆ operator=() [2/2]

template<typename Alloc >
global& ktl::global< Alloc >::operator= ( global< Alloc > &&  rhs)
inlinenoexcept

◆ operator==()

template<typename Alloc >
bool ktl::global< Alloc >::operator== ( const global< Alloc > &  rhs) const
inline

◆ owns()

template<typename Alloc >
template<typename A = Alloc>
std::enable_if<detail::has_owns_v<A>, bool>::type ktl::global< Alloc >::owns ( void *  p) const
inlinenoexcept

◆ set_allocator()

template<typename Alloc >
void ktl::global< Alloc >::set_allocator ( Alloc &&  value)
inlinenoexcept

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