KTL
ktl::reference< Alloc > Class Template Reference

#include <reference.h>

Public Types

typedef detail::get_size_type_t< Alloc > size_type
 

Public Member Functions

 reference (Alloc &alloc) noexcept
 Constructor for forwarding any arguments to the underlying allocator. More...
 
 reference (const reference &other) noexcept
 
 reference (reference &&other) noexcept
 
referenceoperator= (const reference &rhs) noexcept
 
referenceoperator= (reference &&rhs) noexcept
 
bool operator== (const reference &rhs) const noexcept(detail::has_nothrow_equal_v< Alloc >)
 
bool operator!= (const reference &rhs) const noexcept(detail::has_nothrow_not_equal_v< Alloc >)
 
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 >)
 
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::reference< Alloc >::size_type

Constructor & Destructor Documentation

◆ reference() [1/3]

template<typename Alloc >
ktl::reference< Alloc >::reference ( Alloc &  alloc)
inlineexplicitnoexcept

Constructor for forwarding any arguments to the underlying allocator.

◆ reference() [2/3]

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

◆ reference() [3/3]

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

Member Function Documentation

◆ allocate()

template<typename Alloc >
void* ktl::reference< 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::reference< Alloc >::construct ( T *  p,
Args &&...  args 
)
inlinenoexcept

◆ deallocate()

template<typename Alloc >
void ktl::reference< 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::reference< Alloc >::destroy ( T *  p)
inlinenoexcept

◆ get_allocator() [1/2]

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

◆ get_allocator() [2/2]

template<typename Alloc >
Alloc& ktl::reference< 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::reference< Alloc >::max_size ( ) const
inlinenoexcept

◆ operator!=()

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

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ operator==()

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

◆ owns()

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

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