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>();
161 template <std::size_t Index>
164#if TGUI_COMPILED_WITH_CPP_VER >= 17
165 return std::get<Index>(m_variant);
167 return priv::IndexInEmulatedVariantHelper<FirstType, OtherTypes...>::getByIndex(m_any, Index, 0);
177 template <std::size_t Index>
178 const auto& get() const
180#if TGUI_COMPILED_WITH_CPP_VER >= 17
181 return std::get<Index>(m_variant);
183 return priv::IndexInEmulatedVariantHelper<FirstType, OtherTypes...>::getByIndex(m_any, Index, 0);
191 std::size_t index() const
193#if TGUI_COMPILED_WITH_CPP_VER >= 17
194 return m_variant.index();
196 return priv::IndexInEmulatedVariantHelper<FirstType, OtherTypes...>::findIndex(m_any, 0);
204#if TGUI_COMPILED_WITH_CPP_VER >= 17
205 std::variant<Types...> m_variant;