kblib 0.2.3
General utilities library for modern C++
kblib::detail_poly Namespace Reference

Implementation details for poly_obj. More...

Classes

struct  construct_conditional
 
struct  construct_conditional< construct_type::both >
 
struct  construct_conditional< construct_type::both_throw >
 
struct  construct_conditional< construct_type::copy_only >
 
struct  construct_conditional< construct_type::move >
 
struct  construct_conditional< construct_type::none >
 
struct  construct_conditional< construct_type::throw_move >
 
struct  erased_construct
 
struct  erased_hash_t
 
struct  erased_hash_t< T, void_t< fakestd::invoke_result_t< std::hash< T >, T > > >
 
struct  extract_derived_size
 
struct  extract_derived_size< T, void_if_t<(T::max_derived_size > sizeof(T))> >
 
struct  kblib_erased_hash_t
 
struct  kblib_erased_hash_t< T, void_t< fakestd::invoke_result_t< std::hash< T >, T > > >
 

Functions

constexpr auto copyable (construct_type type) noexcept -> bool
 
constexpr auto movable (construct_type type) noexcept -> bool
 
constexpr auto nothrow_movable (construct_type type) noexcept -> bool
 
constexpr auto make_ctype (bool copyable, bool movable, bool nothrow_movable) -> construct_type
 
template<typename T , typename Traits >
auto make_ops_t () noexcept -> erased_construct< Traits >
 

Variables

template<typename T >
constexpr construct_type construct_traits
 

Detailed Description

Implementation details for poly_obj.

Function Documentation

◆ copyable()

constexpr auto kblib::detail_poly::copyable ( construct_type  type) -> bool
constexprnoexcept

Definition at line 72 of file poly_obj.h.

◆ make_ctype()

constexpr auto kblib::detail_poly::make_ctype ( bool  copyable,
bool  movable,
bool  nothrow_movable 
) -> construct_type
constexpr

Definition at line 86 of file poly_obj.h.

◆ make_ops_t()

template<typename T , typename Traits >
auto kblib::detail_poly::make_ops_t ( ) -> erased_construct<Traits>
noexcept

Definition at line 220 of file poly_obj.h.

◆ movable()

constexpr auto kblib::detail_poly::movable ( construct_type  type) -> bool
constexprnoexcept

Definition at line 76 of file poly_obj.h.

◆ nothrow_movable()

constexpr auto kblib::detail_poly::nothrow_movable ( construct_type  type) -> bool
constexprnoexcept

Definition at line 80 of file poly_obj.h.

Variable Documentation

◆ construct_traits

template<typename T >
constexpr construct_type kblib::detail_poly::construct_traits
constexpr
Initial value:
= construct_type::copy_only* std::is_copy_constructible<T>::value
| construct_type::move* std::is_move_constructible<T>::value
| construct_type::throw_move*(
std::is_move_constructible<T>::value
& not std::is_nothrow_move_constructible<T>::value)

Definition at line 176 of file poly_obj.h.