SPH
Public Member Functions | List of all members
AlignedUnion< TArgs > Class Template Reference

Stores value of type std::aligned_union, having size and alignment equal to maximum of sizes and alignments of template types. More...

#include <Variant.h>

Public Member Functions

template<typename T , typename... Ts>
INLINE void emplace (Ts &&... args)
 Creates value of type T in place. More...
 
template<typename T >
INLINE void destroy ()
 Destroys value of type T. More...
 
template<typename T >
INLINE T & get ()
 Converts stored value to a reference of type T. More...
 
template<typename T >
INLINE const T & get () const
 Converts stored value to a reference of type T. More...
 

Detailed Description

template<typename... TArgs>
class AlignedUnion< TArgs >

Stores value of type std::aligned_union, having size and alignment equal to maximum of sizes and alignments of template types.

Definition at line 18 of file Variant.h.

Member Function Documentation

◆ destroy()

template<typename... TArgs>
template<typename T >
INLINE void AlignedUnion< TArgs >::destroy ( )
inline

Destroys value of type T.

Does not check that the value of type T is currently stored

Definition at line 36 of file Variant.h.

◆ emplace()

template<typename... TArgs>
template<typename T , typename... Ts>
INLINE void AlignedUnion< TArgs >::emplace ( Ts &&...  args)
inline

Creates value of type T in place.

Does not check whether another object has already been created.

Definition at line 27 of file Variant.h.

◆ get() [1/2]

template<typename... TArgs>
template<typename T >
INLINE T& AlignedUnion< TArgs >::get ( )
inline

Converts stored value to a reference of type T.

Does not check that the currently stored value has such a type.

Definition at line 44 of file Variant.h.

◆ get() [2/2]

template<typename... TArgs>
template<typename T >
INLINE const T& AlignedUnion< TArgs >::get ( ) const
inline

Converts stored value to a reference of type T.

Does not check that the currently stored value has such a type.

Definition at line 50 of file Variant.h.


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