A buffer of bytes with given alignment. More...
#include <AlignedStorage.h>
Public Member Functions | |
template<typename T > | |
T & | reinterpret_as () |
Access wanted OS Handle with it's actual type. More... | |
template<typename T > | |
const T & | reinterpret_as () const |
Access wanted OS Handle with it's actual type. More... | |
A buffer of bytes with given alignment.
Typically used in PIMPL or similar mechanisms to hide OS Specific system includes. For example it's used used to wrap SocketIPAddress, a Mutex and ConditionVariable.
N | Size in bytes of the Operating System Handle |
Alignment | Alignment in Bytes of the operating system Handle |
|
inline |
Access wanted OS Handle with it's actual type.
This is typically done in a .cpp file where the concrete type of the Handle is known For example it is used inside Mutex class like:
T | Type of the handle. It will statically check size and alignment of requested type. |
|
inline |
Access wanted OS Handle with it's actual type.
This is typically done in a .cpp file where the concrete type of the Handle is known For example it is used inside Mutex class like:
T | Type of the handle. It will statically check size and alignment of requested type. |