TRLC Platform Library  1.0.0
Header-only C++ library for compile-time platform detection and abstraction
trlc::platform::AlignedType< TAlignment > Struct Template Reference

#include <trlc/platform/typeinfo.hpp>

Public Member Functions

void * get ()
 Get a pointer to the aligned storage. More...
 
const void * get () const
 Get a const pointer to the aligned storage. More...
 
template<typename T >
T * as ()
 Get a typed pointer to the aligned storage. More...
 
template<typename T >
const T * as () const
 Get a const typed pointer to the aligned storage. More...
 

Public Attributes

char data [TAlignment]
 The aligned storage data. More...
 

Detailed Description

template<size_t TAlignment>
struct trlc::platform::AlignedType< TAlignment >

Examples
/home/tranglc/sources/trlc-platform/include/trlc/platform/typeinfo.hpp.

Definition at line 276 of file typeinfo.hpp.

Member Function Documentation

◆ as() [1/2]

template<size_t TAlignment>
template<typename T >
T* trlc::platform::AlignedType< TAlignment >::as ( )
inline

Get a typed pointer to the aligned storage.

Definition at line 291 of file typeinfo.hpp.

◆ as() [2/2]

template<size_t TAlignment>
template<typename T >
const T* trlc::platform::AlignedType< TAlignment >::as ( ) const
inline

Get a const typed pointer to the aligned storage.

Definition at line 298 of file typeinfo.hpp.

◆ get() [1/2]

template<size_t TAlignment>
void* trlc::platform::AlignedType< TAlignment >::get ( )
inline

Get a pointer to the aligned storage.

Definition at line 284 of file typeinfo.hpp.

◆ get() [2/2]

template<size_t TAlignment>
const void* trlc::platform::AlignedType< TAlignment >::get ( ) const
inline

Get a const pointer to the aligned storage.

Definition at line 287 of file typeinfo.hpp.

Member Data Documentation

◆ data

template<size_t TAlignment>
char trlc::platform::AlignedType< TAlignment >::data[TAlignment]

The aligned storage data.

Definition at line 281 of file typeinfo.hpp.


The documentation for this struct was generated from the following file: