|
guanaqo
develop
Utilities for scientific software
|
#include <guanaqo/type-erasure.hpp>
Struct that stores pointers to functions to copy, move or destroy a polymorphic object.
Inherit from this struct to add useful functions.
Definition at line 135 of file type-erasure.hpp.
Public Member Functions | |
| BasicVTable ()=default | |
| template<class T> | |
| BasicVTable (std::in_place_t, T &) noexcept | |
| void | copy (const void *self, void *storage) const |
| void | move (void *self, void *storage) const |
| void | destroy (void *self) const |
Public Attributes | |
| const std::type_info * | type = &typeid(void) |
| The original type of the stored object. | |
| const CopyMoveDestroyVTable * | copy_move_destroy_functions = nullptr |
| Function pointers for copying, moving and destroying the stored object. | |
|
default |
|
inlinenoexcept |
Definition at line 144 of file type-erasure.hpp.
|
inline |
Definition at line 149 of file type-erasure.hpp.
|
inline |
Definition at line 152 of file type-erasure.hpp.
|
inline |
Definition at line 155 of file type-erasure.hpp.
| const std::type_info* guanaqo::BasicVTable::type = &typeid(void) |
The original type of the stored object.
Definition at line 137 of file type-erasure.hpp.
| const CopyMoveDestroyVTable* guanaqo::BasicVTable::copy_move_destroy_functions = nullptr |
Function pointers for copying, moving and destroying the stored object.
Definition at line 139 of file type-erasure.hpp.