Implements a read-only non owning storage.
More...
#include <siplasplas/typeerasure/anystorage/nonowning.hpp>
Implements a read-only non owning storage.
A non owning storage stores a reference to an existing object instead of hosting it. Size of non owning storages is always sizeof(void*)
.
cpp::ConstNonOwningStorage::ConstNonOwningStorage |
( |
const void * |
object | ) |
|
|
inline |
Initializes the storage pointing it to the given object.
- Parameters
-
object | Pointer to the object to reference |
void cpp::ConstNonOwningStorage::rebind |
( |
const void * |
object | ) |
|
|
inline |
Reassigns the storage to reference another object.
- Parameters
-
object | Pointer to the new object to reference |
Returns a pointer to the storage memory space.
- Parameters
-
typeInfo | Type information with the required alignment and storage size |
- Returns
- A pointer to the reference object. Alignment is ignored, this function assumes the pointer to the referenced object is valid
The documentation for this class was generated from the following file: