|
Embedded Template Library 1.0
|
#include <alignment.h>
Public Types | |
| typedef T | value_type |
| typedef T & | reference |
| typedef const T & | const_reference |
| typedef T * | pointer |
| typedef const T * | const_pointer |
Public Member Functions | |
| ~typed_storage () | |
| bool | has_value () const |
| template<typename T1 > | |
| reference | create (const T1 &t1) |
| template<typename T1 , typename T2 > | |
| reference | create (const T1 &t1, const T2 &t2) |
| template<typename T1 , typename T2 , typename T3 > | |
| reference | create (const T1 &t1, const T2 &t2, const T3 &t3) |
| template<typename T1 , typename T2 , typename T3 , typename T4 > | |
| reference | create (const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4) |
| void | destroy () |
| Calls the destructor of the wrapped object and asserts if has_value() is false. | |
| pointer | operator-> () |
| const_pointer | operator-> () const |
| reference | operator* () |
| const_reference | operator* () const |
Wrapper class that provides a memory area and lets the user create an instance of T in this memory at runtime. This class also erases the destructor call of T, i.e. if typed_storage goes out of scope, the destructor if the wrapped type will not be called. This can be done explicitly by calling destroy().
| T | Type of element stored in this instance of typed_storage. |
|
inline |
Default destructor which will NOT call the destructor of the object which was created by calling create().
|
inline |
Constructs the instance of T with type T1 asserts if has_value() is false.
Constructs the instance of T with types T1, T2 asserts if has_value() is false.
Constructs the instance of T with types T1, T2, T3 asserts if has_value() is false.
|
inline |
Constructs the instance of T with types T1, T2, T3, T4 asserts if has_value() is false.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |