fennec
Loading...
Searching...
No Matches
fennec::variant< TypesT >

A structure that represents a union between TypesT... More...

#include <variant.h>

Detailed Description

template<typename... TypesT>
struct fennec::variant< TypesT >
Template Parameters
TypesTThe types to hold in the variant

Public Member Functions

 variant ()
 Default Constructor, constructs the first type in TypesT... that is default constructible.
 
template<typename T >
 variant (T &&t)
 Conversion Constructor, constructs the type in TypesT... that is identical to T or the first that is constructible with T
 
template<typename T , typename... ArgsT>
 variant (type_identity< T >, ArgsT &&...args)
 Emplace Constructor, constructs the first type in TypesT... that is constructible with ArgsT...
 
 variant (const variant &v)
 Copy Constructor.
 
 variant (variant &&v) noexcept
 Move Constructor.
 
 ~variant ()
 Destructor, if a type is held, destruct it.
 

Constructor & Destructor Documentation

◆ variant() [1/4]

template<typename... TypesT>
template<typename T >
fennec::variant< TypesT >::variant ( T &&  t)
inline
Template Parameters
TThe type of the value
Parameters
tThe value to forward

◆ variant() [2/4]

template<typename... TypesT>
template<typename T , typename... ArgsT>
fennec::variant< TypesT >::variant ( type_identity< T >  ,
ArgsT &&...  args 
)
inline
Template Parameters
ArgsTThe arguments of the constructor
Parameters
argsThe argument values

◆ variant() [3/4]

template<typename... TypesT>
fennec::variant< TypesT >::variant ( const variant< TypesT > &  v)
inline
Parameters
vThe variant to copy

◆ variant() [4/4]

template<typename... TypesT>
fennec::variant< TypesT >::variant ( variant< TypesT > &&  v)
inlinenoexcept
Parameters
vThe variant to move

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