siplasplas
|
Contains minimal information to execute the value semantics operations of a type. More...
#include <typeinfo.hpp>
Public Member Functions | |
detail::ValueSemantics | semantics () const |
Retuns the type-erased semantics of the type. More... | |
bool | isPointer () const |
Checks if the type is a pointer type. | |
detail::ValueSemanticsOperationFunction | semantics (detail::ValueSemanticsOperation operation) const |
Returns the function implementing the given valuesemantics operation for the type. | |
void | defaultConstruct (void *where) const |
Default constructs a value of the type If the passed argument is not of the represented type, the behavior is undefined. More... | |
void | copyConstruct (void *where, const void *other) const |
Copy constructs values of the type If the passed arguments are not of the represented type, the behavior is undefined. More... | |
void | moveConstruct (void *where, void *other) const |
Move constructs values of the type If the passed arguments are not of the represented type, the behavior is undefined. More... | |
void | copyAssign (void *where, const void *other) const |
Move assigns values of the type If the passed arguments are not of the represented type, the behavior is undefined. More... | |
void | moveAssign (void *where, void *other) const |
Move assigns values of the type If the passed arguments are not of the represented type, the behavior is undefined. More... | |
void | destroy (void *where) const |
Destroys objects of the type If the passed arguments are not of the represented type, the behavior is undefined. More... | |
constexpr cpp::constexp::ConstArrayView< TypeInfo > | arguments () const |
Returns the type information of the function arguments. More... | |
![]() | |
constexpr bool | operator() (const TypeTraitIndex typeTrait) const |
constexpr ctti::detail::cstring | name () const |
constexpr ctti::detail::cstring | typeName () const |
constexpr const ctti::type_id_t & | type_id () const |
constexpr std::size_t | sizeOf () const |
constexpr std::size_t | alignment () const |
constexpr cpp::FunctionKind | kind () const |
constexpr bool | isPointer () const |
Static Public Member Functions | |
template<typename T > | |
static constexpr TypeInfo | get () |
Returns the type information of type T. | |
template<typename T > | |
static constexpr TypeInfo | get (const T &) |
Returns the type information of type T. | |
![]() | |
template<typename T > | |
static constexpr TypeInfo | get () |
Friends | |
constexpr bool | operator== (const TypeInfo &lhs, const TypeInfo &rhs) |
constexpr bool | operator!= (const TypeInfo &lhs, const TypeInfo &rhs) |
Additional Inherited Members | |
![]() | |
enum | TypeTraitIndex : std::size_t { is_void, is_null_pointer, is_integral, is_floating_point, is_array, is_enum, is_union, is_class, is_function, is_pointer, is_lvalue_reference, is_rvalue_reference, is_member_object_pointer, is_member_function_pointer, is_fundamental, is_arithmetic, is_scalar, is_object, is_compound, is_reference, is_member_pointer, is_const, is_volatile, is_trivial, is_trivially_copyable, is_standard_layout, is_pod, is_literal_type, is_empty, is_polymorphic, is_abstract, is_signed, is_unsigned, is_default_constructible, is_copy_constructible, is_move_constructible, is_copy_assignable, is_move_assignable, is_destructible, is_trivially_default_constructible, is_trivially_copy_constructible, is_trivially_move_constructible, is_trivially_copy_assignable, is_trivially_move_assignable, is_trivially_destructible, is_nothrow_default_constructible, is_nothrow_copy_constructible, is_nothrow_move_constructible, is_nothrow_copy_assignable, is_nothrow_move_assignable, is_nothrow_destructible, has_virtual_destructor, ALWAYS_AT_END_PLEASE__ACTUALLY_NOT_A_TRAIT_INDEX } |
using | BitsetValue = std::uint64_t |
using | TypeTraits = std::bitset< static_cast< std::size_t >(TypeTraitIndex::ALWAYS_AT_END_PLEASE__ACTUALLY_NOT_A_TRAIT_INDEX)> |
Contains minimal information to execute the value semantics operations of a type.
This class stores the alignment and value semantics operations of a type. The value semantics operations are aset of type-erased functions mapping to the different value semantics features (CopyConstructible, DefaultConstructible, etc). This mapping is implemented as a lookup table of function pointers.
|
inline |
Returns the type information of the function arguments.
The behavior is undefined if the type is not a function type
|
inline |
Move assigns values of the type If the passed arguments are not of the represented type, the behavior is undefined.
where | Address of the object to be assigned to |
other | Address of the object to assign from |
|
inline |
Copy constructs values of the type If the passed arguments are not of the represented type, the behavior is undefined.
where | Address of the object to be constructed |
other | Address of the object to copy from |
|
inline |
Default constructs a value of the type If the passed argument is not of the represented type, the behavior is undefined.
where | Address of the object to be constructed |
|
inline |
Destroys objects of the type If the passed arguments are not of the represented type, the behavior is undefined.
where | Pointer to the object to destroy |
|
inline |
Move assigns values of the type If the passed arguments are not of the represented type, the behavior is undefined.
where | Address of the object to be assigned to |
other | Reference of the object to assign from (The pointer is a pointer to the rvalue reference up in the call stack). |
|
inline |
Move constructs values of the type If the passed arguments are not of the represented type, the behavior is undefined.
where | Address of the object to be constructed |
other | Reference of the object to move from (The pointer is a pointer to the rvalue reference up in the call stack). |
|
inline |
Retuns the type-erased semantics of the type.
See valueSemantics().