KTL
ktl::detail Namespace Reference

Classes

struct  fallback_builder
 
struct  fallback_builder< R, std::tuple< Alloc > >
 
struct  fallback_builder< R, std::tuple< Ts... > >
 
struct  segragator_builder
 
struct  segragator_builder< R, std::tuple< Alloc > >
 
struct  segragator_builder< R, std::tuple< Ts... > >
 
struct  pow2
 
struct  tuple_split_indices
 
struct  tuple_split_indices< O, std::index_sequence< N... >, std::index_sequence< M... >, std::tuple< T... > >
 
struct  size_invert
 
struct  size_invert< false, N, M >
 
struct  size_invert< true, N, M >
 
struct  has_no_value_type
 
struct  has_no_value_type< Alloc, std::void_t< typename Alloc::value_type > >
 
struct  get_size_type
 
struct  get_size_type< Alloc, std::void_t< typename Alloc::size_type > >
 
struct  has_construct
 
struct  has_construct< std::void_t< decltype(std::declval< Alloc & >().construct(std::declval< Args >()...))>, Alloc, Args... >
 
struct  has_destroy
 
struct  has_destroy< Alloc, Ptr, std::void_t< decltype(std::declval< Alloc & >().destroy(std::declval< Ptr >()))> >
 
struct  has_max_size
 
struct  has_max_size< Alloc, std::void_t< decltype(std::declval< Alloc & >().max_size())> >
 
struct  has_owns
 
struct  has_owns< Alloc, std::void_t< decltype(std::declval< Alloc & >().owns(std::declval< void * >()))> >
 
struct  has_nothrow_construct
 
struct  has_nothrow_construct< std::enable_if_t< has_construct_v< Alloc, Args... > >, Alloc, Args... >
 
struct  has_nothrow_destroy
 
struct  has_nothrow_destroy< Alloc, Ptr, std::enable_if_t< has_destroy_v< Alloc, Ptr > > >
 
struct  has_nothrow_max_size
 
struct  has_nothrow_max_size< Alloc, std::enable_if_t< has_max_size_v< Alloc > > >
 
struct  has_nothrow_owns
 
struct  has_nothrow_owns< Alloc, std::enable_if_t< has_owns_v< Alloc > > >
 

Typedefs

template<typename Alloc >
using get_size_type_t = typename get_size_type< Alloc, void >::type
 

Functions

void * aligned_malloc (size_t size, size_t alignment) noexcept
 
void aligned_free (void *ptr) noexcept
 
template<typename T , typename... Args>
T * aligned_new (size_t alignment, Args &&... args) noexcept(noexcept(T(std::declval< Args >()...)))
 
template<typename T >
void aligned_delete (T *p) noexcept(noexcept(p->~T()))
 
constexpr size_t align_to_architecture (size_t n) noexcept
 
constexpr uintmax_t log2 (uintmax_t n) noexcept
 

Variables

constexpr size_t ALIGNMENT = alignof(std::max_align_t)
 
constexpr size_t ALIGNMENT_MASK = ALIGNMENT - 1
 
template<typename Alloc >
constexpr bool has_no_value_type_v = has_no_value_type<Alloc, void>::value
 
template<typename Alloc , typename... Args>
constexpr bool has_construct_v = has_construct<void, Alloc, Args...>::value
 
template<typename Alloc , typename Ptr >
constexpr bool has_destroy_v = has_destroy<Alloc, Ptr, void>::value
 
template<typename Alloc >
constexpr bool has_max_size_v = has_max_size<Alloc, void>::value
 
template<typename Alloc >
constexpr bool has_owns_v = has_owns<Alloc, void>::value
 
template<typename Alloc >
constexpr bool has_nothrow_allocate_v = noexcept(std::declval<Alloc&>().allocate(std::declval<size_t>()))
 
template<typename Alloc >
constexpr bool has_nothrow_deallocate_v = noexcept(std::declval<Alloc&>().deallocate(std::declval<void*>(), std::declval<size_t>()))
 
template<typename T >
constexpr bool has_nothrow_equal_v = noexcept(std::declval<T&>() == std::declval<T&>())
 
template<typename T >
constexpr bool has_nothrow_not_equal_v = noexcept(std::declval<T&>() == std::declval<T&>())
 
template<typename Alloc , typename... Args>
constexpr bool has_nothrow_construct_v = has_nothrow_construct<void, Alloc, Args...>::value
 
template<typename Alloc , typename Ptr >
constexpr bool has_nothrow_destroy_v = has_nothrow_destroy<Alloc, Ptr, void>::value
 
template<typename Alloc >
constexpr bool has_nothrow_max_size_v = has_nothrow_max_size<Alloc, void>::value
 
template<typename Alloc >
constexpr bool has_nothrow_owns_v = has_nothrow_owns<Alloc, void>::value
 

Typedef Documentation

◆ get_size_type_t

template<typename Alloc >
using ktl::detail::get_size_type_t = typedef typename get_size_type<Alloc, void>::type

Function Documentation

◆ align_to_architecture()

constexpr size_t ktl::detail::align_to_architecture ( size_t  n)
inlineconstexprnoexcept

◆ aligned_delete()

template<typename T >
void ktl::detail::aligned_delete ( T *  p)
noexcept

◆ aligned_free()

void ktl::detail::aligned_free ( void *  ptr)
inlinenoexcept

◆ aligned_malloc()

void* ktl::detail::aligned_malloc ( size_t  size,
size_t  alignment 
)
inlinenoexcept

◆ aligned_new()

template<typename T , typename... Args>
T* ktl::detail::aligned_new ( size_t  alignment,
Args &&...  args 
)
noexcept

◆ log2()

constexpr uintmax_t ktl::detail::log2 ( uintmax_t  n)
inlineconstexprnoexcept

Variable Documentation

◆ ALIGNMENT

constexpr size_t ktl::detail::ALIGNMENT = alignof(std::max_align_t)
constexpr

◆ ALIGNMENT_MASK

constexpr size_t ktl::detail::ALIGNMENT_MASK = ALIGNMENT - 1
constexpr

◆ has_construct_v

template<typename Alloc , typename... Args>
constexpr bool ktl::detail::has_construct_v = has_construct<void, Alloc, Args...>::value
constexpr

◆ has_destroy_v

template<typename Alloc , typename Ptr >
constexpr bool ktl::detail::has_destroy_v = has_destroy<Alloc, Ptr, void>::value
constexpr

◆ has_max_size_v

template<typename Alloc >
constexpr bool ktl::detail::has_max_size_v = has_max_size<Alloc, void>::value
constexpr

◆ has_no_value_type_v

template<typename Alloc >
constexpr bool ktl::detail::has_no_value_type_v = has_no_value_type<Alloc, void>::value
constexpr

◆ has_nothrow_allocate_v

template<typename Alloc >
constexpr bool ktl::detail::has_nothrow_allocate_v = noexcept(std::declval<Alloc&>().allocate(std::declval<size_t>()))
constexpr

◆ has_nothrow_construct_v

template<typename Alloc , typename... Args>
constexpr bool ktl::detail::has_nothrow_construct_v = has_nothrow_construct<void, Alloc, Args...>::value
constexpr

◆ has_nothrow_deallocate_v

template<typename Alloc >
constexpr bool ktl::detail::has_nothrow_deallocate_v = noexcept(std::declval<Alloc&>().deallocate(std::declval<void*>(), std::declval<size_t>()))
constexpr

◆ has_nothrow_destroy_v

template<typename Alloc , typename Ptr >
constexpr bool ktl::detail::has_nothrow_destroy_v = has_nothrow_destroy<Alloc, Ptr, void>::value
constexpr

◆ has_nothrow_equal_v

template<typename T >
constexpr bool ktl::detail::has_nothrow_equal_v = noexcept(std::declval<T&>() == std::declval<T&>())
constexpr

◆ has_nothrow_max_size_v

template<typename Alloc >
constexpr bool ktl::detail::has_nothrow_max_size_v = has_nothrow_max_size<Alloc, void>::value
constexpr

◆ has_nothrow_not_equal_v

template<typename T >
constexpr bool ktl::detail::has_nothrow_not_equal_v = noexcept(std::declval<T&>() == std::declval<T&>())
constexpr

◆ has_nothrow_owns_v

template<typename Alloc >
constexpr bool ktl::detail::has_nothrow_owns_v = has_nothrow_owns<Alloc, void>::value
constexpr

◆ has_owns_v

template<typename Alloc >
constexpr bool ktl::detail::has_owns_v = has_owns<Alloc, void>::value
constexpr