26#ifndef TGUI_VARIANT_HPP
27#define TGUI_VARIANT_HPP
29#if TGUI_COMPILED_WITH_CPP_VER >= 17
32 #include <TGUI/Any.hpp>
33 #include <TGUI/Exception.hpp>
86#if TGUI_COMPILED_WITH_CPP_VER >= 17
87 template <
typename... Types>
89 template <
typename FirstType,
typename... OtherTypes>
99#if TGUI_COMPILED_WITH_CPP_VER >= 17
113 template <
typename T>
115#if TGUI_COMPILED_WITH_CPP_VER >= 17
129 template <
typename T>
132#if TGUI_COMPILED_WITH_CPP_VER >= 17
133 return std::get<T>(m_variant);
135 return m_any.as<T>();
145 template <
typename T>
148#if TGUI_COMPILED_WITH_CPP_VER >= 17
149 return std::get<T>(m_variant);
151 return m_any.as<T>();
204#if TGUI_COMPILED_WITH_CPP_VER >= 17
205 std::variant<Types...> m_variant;
Definition: Variant.hpp:92
Variant()
Default constructor.
Definition: Variant.hpp:98
const T & get() const
Retrieve the value in the variant.
Definition: Variant.hpp:146
T & get()
Retrieve the value in the variant.
Definition: Variant.hpp:130
Variant(const T &value)
Construct the variant with an initial value.
Definition: Variant.hpp:114
Namespace that contains all TGUI functions and classes.
Definition: AbsoluteOrRelativeValue.hpp:36