|
Mundy: Multibody Nonlocal Dynamics Version of the Day
|
#include <variant.hpp>
Helpers | |
| template<size_t J> | |
| using | alternative_t = type_at_index_t<J, Alts...> |
| The J'th alternative type. | |
| constexpr | variant () |
| Default constructor initializes the first type as active. | |
| template<class T> | |
| constexpr | variant (const T &value) |
| Constructor for initializing with a specific type. | |
| constexpr size_t | index () const |
| Get the active type index. | |
| template<class T> | |
| constexpr bool | holds_alternative () const |
| Check if a specific type is active. | |
| template<class T> | |
| constexpr T & | get () |
| Get the value of the active type. | |
| template<class T> | |
| constexpr const T & | get () const |
| template<size_t ActiveIdx> | |
| constexpr auto | get () -> alternative_t< ActiveIdx > & |
| Get the value of the active type based on the active index. | |
| template<size_t ActiveIdx> | |
| constexpr auto | get () const -> const alternative_t< ActiveIdx > & |
| template<class T> | |
| constexpr void | operator= (T const &value) |
| Set a new active type, default-constructing the previous type. | |
| static constexpr size_t | size () |
| Get the number of alternatives. | |
| template<class T> | |
| static constexpr size_t | index_of () |
| using mundy::variant< Alts >::alternative_t = type_at_index_t<J, Alts...> |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |