Cuda battery library
Loading...
Searching...
No Matches
battery::variant< Ts > Struct Template Reference

#include <variant.hpp>

Public Member Functions

CUDA variant ()
 
CUDA NI variant (const variant< Ts... > &from)
 
CUDA NI variant (variant< Ts... > &&from)
 
CUDA NI variant< Ts... > & operator= (variant< Ts... > &rhs)
 
CUDA NI variant< Ts... > & operator= (variant< Ts... > &&rhs)
 
CUDA size_t index () const
 
template<size_t i>
CUDA NI void set (alternative< i > &value)
 
template<size_t i>
CUDA NI void set (alternative< i > &&value)
 
CUDA NI ~variant ()
 
CUDA NI void print () const
 

Static Public Member Functions

template<size_t i>
CUDA static NI variant create (const alternative< i > &value)
 
template<size_t i>
CUDA static NI variant create (alternative< i > &&value)
 

Friends

template<typename... Us>
CUDA friend bool operator== (const variant< Us... > &lhs, const variant< Us... > &rhs)
 
template<size_t i, typename... Us>
CUDA friend impl::variant_alternative< i, Us... >::type & get (variant< Us... > &v)
 
template<size_t i, typename... Us>
CUDA friend const impl::variant_alternative< i, Us... >::type & get (const variant< Us... > &v)
 

Constructor & Destructor Documentation

◆ variant() [1/3]

template<typename... Ts>
CUDA battery::variant< Ts >::variant ( )
inline

◆ variant() [2/3]

template<typename... Ts>
CUDA NI battery::variant< Ts >::variant ( const variant< Ts... > & from)
inline

◆ variant() [3/3]

template<typename... Ts>
CUDA NI battery::variant< Ts >::variant ( variant< Ts... > && from)
inline

◆ ~variant()

template<typename... Ts>
CUDA NI battery::variant< Ts >::~variant ( )
inline

Member Function Documentation

◆ create() [1/2]

template<typename... Ts>
template<size_t i>
CUDA static NI variant battery::variant< Ts >::create ( const alternative< i > & value)
inlinestatic

◆ create() [2/2]

template<typename... Ts>
template<size_t i>
CUDA static NI variant battery::variant< Ts >::create ( alternative< i > && value)
inlinestatic

◆ operator=() [1/2]

template<typename... Ts>
CUDA NI variant< Ts... > & battery::variant< Ts >::operator= ( variant< Ts... > & rhs)
inline

◆ operator=() [2/2]

template<typename... Ts>
CUDA NI variant< Ts... > & battery::variant< Ts >::operator= ( variant< Ts... > && rhs)
inline

◆ index()

template<typename... Ts>
CUDA size_t battery::variant< Ts >::index ( ) const
inline

◆ set() [1/2]

template<typename... Ts>
template<size_t i>
CUDA NI void battery::variant< Ts >::set ( alternative< i > & value)
inline

◆ set() [2/2]

template<typename... Ts>
template<size_t i>
CUDA NI void battery::variant< Ts >::set ( alternative< i > && value)
inline

◆ print()

template<typename... Ts>
CUDA NI void battery::variant< Ts >::print ( ) const
inline

Friends And Related Symbol Documentation

◆ operator==

template<typename... Ts>
template<typename... Us>
CUDA friend bool operator== ( const variant< Us... > & lhs,
const variant< Us... > & rhs )
friend

◆ get [1/2]

template<typename... Ts>
template<size_t i, typename... Us>
CUDA friend impl::variant_alternative< i, Us... >::type & get ( variant< Us... > & v)
friend

◆ get [2/2]

template<typename... Ts>
template<size_t i, typename... Us>
CUDA friend const impl::variant_alternative< i, Us... >::type & get ( const variant< Us... > & v)
friend

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