Spicy
Public Member Functions | Public Attributes | List of all members
hilti::rt::Union< T > Class Template Reference
Inheritance diagram for hilti::rt::Union< T >:
hilti::rt::trait::isUnion

Public Member Functions

 Union (const Union &)=default
 
 Union (Union &&) noexcept=default
 
Unionoperator= (const Union &)=default
 
Unionoperator= (Union &&) noexcept=default
 
template<typename F >
 Union (const F &t)
 
template<typename F >
 Union (const F &&t)
 
template<typename F >
Unionoperator= (const F &t)
 
template<typename F >
Unionoperator= (F &&t)
 
auto index () const
 

Public Attributes

std::variant< std::monostate, T... > value
 

Member Function Documentation

◆ index()

template<typename... T>
auto hilti::rt::Union< T >::index ( ) const
inline

Returns the index of the value the variant holds. Because we always use std::monostate as the first type, this will return a value greater zero iff a value is set.


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