KTL
Loading...
Searching...
No Matches
ktl::detail Namespace Reference

Classes

struct  fallback_builder
 
struct  fallback_builder< R, std::tuple< Alloc > >
 
struct  fallback_builder< R, std::tuple< Ts... > >
 
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_no_value_type
 
struct  has_no_value_type< Alloc, std::void_t< typename Alloc::value_type > >
 
struct  has_nothrow_allocate
 
struct  has_nothrow_allocate< Alloc, false >
 
struct  has_nothrow_allocate< Alloc, true >
 
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 > > >
 
struct  has_owns
 
struct  has_owns< Alloc, std::void_t< decltype(std::declval< Alloc & >().owns(std::declval< void * >()))> >
 
struct  has_plain_allocate
 
struct  has_plain_allocate< Alloc, std::void_t< decltype(std::declval< Alloc & >().allocate(std::declval< size_t >()))> >
 
struct  is_decrementable
 
struct  is_decrementable< T, std::void_t< decltype(--std::declval< T & >())> >
 
struct  is_function_pointer
 
struct  is_function_pointer< R(*)(Ts...), std::void_t< R(*)(Ts...)> >
 
struct  is_iterable
 
struct  is_iterable< T, std::void_t< decltype(std::begin(std::declval< T & >())), decltype(std::end(std::declval< T & >()))> >
 
struct  pow2
 
struct  segragator_builder
 
struct  segragator_builder< R, std::tuple< Alloc > >
 
struct  segragator_builder< R, std::tuple< Ts... > >
 
struct  size_invert
 
struct  size_invert< false, N, M >
 
struct  size_invert< true, N, M >
 
struct  tuple_split_indices
 
struct  tuple_split_indices< O, std::index_sequence< N... >, std::index_sequence< M... >, std::tuple< T... > >
 
struct  underlying_type
 
struct  underlying_type< T, std::enable_if_t< std::is_enum_v< T > > >
 
struct  underlying_type< T, std::enable_if_t< std::is_pointer_v< T > &&!is_function_pointer_v< T > > >
 

Typedefs

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

Functions

template<typename T >
constexpr T min_range (size_t bits)
 
template<typename T >
constexpr T max_range (size_t bits)
 
voidaligned_malloc (size_t size, size_t alignment) noexcept
 
void aligned_free (void *ptr) noexcept
 
template<typename T , typename... Args>
Taligned_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
 
constexpr uintmax_t bits_to_represent (uintmax_t n) noexcept
 
constexpr uintmax_t bits_in_range (intmax_t min, intmax_t max) noexcept
 
template<typename Alloc >
voidallocate (Alloc &alloc, size_t n, const source_location source) noexcept(false)
 

Variables

template<typename T >
constexpr bool is_iterable_v = is_iterable<T>::value
 
template<typename T >
constexpr bool is_decrementable_v = is_decrementable<T>::value
 
template<typename T >
constexpr bool is_function_pointer_v = is_function_pointer<T>::value
 
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 >
constexpr bool has_plain_allocate_v = has_plain_allocate<Alloc>::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 = has_nothrow_allocate<Alloc, has_plain_allocate_v<Alloc>>::value
 
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

◆ underlying_type_t

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

◆ allocate()

template<typename Alloc >
void * ktl::detail::allocate ( Alloc alloc,
size_t  n,
const source_location  source 
)

◆ bits_in_range()

constexpr uintmax_t ktl::detail::bits_in_range ( intmax_t  min,
intmax_t  max 
)
inlineconstexprnoexcept

◆ bits_to_represent()

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

◆ log2()

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

◆ max_range()

template<typename T >
constexpr T ktl::detail::max_range ( size_t  bits)
constexpr

◆ min_range()

template<typename T >
constexpr T ktl::detail::min_range ( size_t  bits)
constexpr

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 = has_nothrow_allocate<Alloc, has_plain_allocate_v<Alloc>>::value
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

◆ has_plain_allocate_v

template<typename Alloc >
constexpr bool ktl::detail::has_plain_allocate_v = has_plain_allocate<Alloc>::value
constexpr

◆ is_decrementable_v

template<typename T >
constexpr bool ktl::detail::is_decrementable_v = is_decrementable<T>::value
constexpr

◆ is_function_pointer_v

template<typename T >
constexpr bool ktl::detail::is_function_pointer_v = is_function_pointer<T>::value
constexpr

◆ is_iterable_v

template<typename T >
constexpr bool ktl::detail::is_iterable_v = is_iterable<T>::value
constexpr