TGUI  1.3-dev
Loading...
Searching...
No Matches
tgui::Variant< Types > Class Template Reference

Public Member Functions

 Variant ()
 Default constructor.
 
template<typename T >
 Variant (T &&value)
 Construct the variant with an initial value.
 
template<typename T >
TGUI_NODISCARD T & get ()
 Retrieve the value in the variant.
 
template<typename T >
TGUI_NODISCARD const T & get () const
 Retrieve the value in the variant.
 

Constructor & Destructor Documentation

◆ Variant()

template<typename... Types>
template<typename T >
tgui::Variant< Types >::Variant ( T && value)
inline

Construct the variant with an initial value.

Parameters
valueValue to store in the variant

Member Function Documentation

◆ get() [1/2]

template<typename... Types>
template<typename T >
TGUI_NODISCARD T & tgui::Variant< Types >::get ( )
inline

Retrieve the value in the variant.

Returns
Stored value

◆ get() [2/2]

template<typename... Types>
template<typename T >
TGUI_NODISCARD const T & tgui::Variant< Types >::get ( ) const
inline

Retrieve the value in the variant.

Returns
Stored value

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