kblib 0.2.3
General utilities library for modern C++
|
Provides poly_obj, which enables polymorphism to be used without unnecessary per-object dynamic allocations. More...
Go to the source code of this file.
Namespaces | |
namespace | kblib |
The main namespace in which all entities from kblib are defined. | |
namespace | kblib::detail_poly |
Implementation details for poly_obj. | |
Typedefs | |
template<typename Obj > | |
using | kblib::move_only_traits = poly_obj_traits< Obj, construct_type::move > |
template<typename Obj > | |
using | kblib::no_move_traits = poly_obj_traits< Obj, construct_type::none > |
Enumerations | |
enum class | kblib::construct_type : unsigned { kblib::none = 0 , kblib::copy_only = 1 , kblib::move = 2 , kblib::both = 3 , kblib::throw_move = 4 , kblib::both_throw = 5 } |
Functions | |
constexpr auto | kblib::operator| (construct_type l, construct_type r) noexcept -> construct_type |
constexpr auto | kblib::operator& (construct_type l, construct_type r) noexcept -> construct_type |
constexpr auto | kblib::operator* (construct_type l, bool r) noexcept -> construct_type |
constexpr auto | kblib::detail_poly::copyable (construct_type type) noexcept -> bool |
constexpr auto | kblib::detail_poly::movable (construct_type type) noexcept -> bool |
constexpr auto | kblib::detail_poly::nothrow_movable (construct_type type) noexcept -> bool |
constexpr auto | kblib::detail_poly::make_ctype (bool copyable, bool movable, bool nothrow_movable) -> construct_type |
template<typename T , typename Traits > | |
auto | kblib::detail_poly::make_ops_t () noexcept -> erased_construct< Traits > |
template<typename T > | |
auto | kblib::noop (void *, const T *) -> T * |
Does nothing; matches the copy construction signature. More... | |
template<typename T , bool nothrow> | |
auto | kblib::noop (void *, T *) noexcept(nothrow) -> T * |
Does nothing; matches the move construction signature. More... | |
template<bool warn> | |
constexpr auto | kblib::poly_warn_if () -> std::nullptr_t |
template<> | |
constexpr auto | kblib::poly_warn_if< true > () -> std::nullptr_t |
Variables | |
template<typename T > | |
constexpr construct_type | kblib::detail_poly::construct_traits |
Provides poly_obj, which enables polymorphism to be used without unnecessary per-object dynamic allocations.
Definition in file poly_obj.h.