|
vari
|
A non-nullable pointer to one of the types in Ts... More...
#include <vref.h>
Public Member Functions | |
|
template<typename... Us> requires ( vconvertible_to< typelist< Us... >, types > ) | |
| constexpr | _vref (_vref< Us... > const &p) noexcept |
| Copy constructor for any compatible vref. | |
|
template<typename U > requires ( vconvertible_to< typelist< U >, types > ) | |
| constexpr | _vref (U &u) noexcept |
| Constructs a vref from a reference to one of the types that vref can reference. | |
| constexpr auto * | get () const noexcept |
| Returns a pointer to the pointed-to type. More... | |
| constexpr index_type | index () const noexcept |
| Returns the index representing the type currently being referenced. More... | |
|
template<typename U > requires ( vconvertible_to< types, typelist< U > > ) | |
| constexpr | operator U& () const noexcept |
| If the reference can only point to one type, it allows conversion to a reference of that type. | |
| constexpr auto & | operator* () const noexcept |
| Dereferences to the pointed-to type. More... | |
| constexpr auto * | operator-> () const noexcept |
| Provides member access to the pointed-to type. More... | |
| template<typename... Fs> | |
| constexpr decltype(auto) | visit (Fs &&... fs) const |
Calls the appropriate function from the list fs..., based on the type of the current target. | |
| constexpr pointer | vptr () const &noexcept |
| Constructs a variadic pointer that points to the same target as the current reference. | |
Friends | |
| constexpr void | swap (_vref &lh, _vref &rh) noexcept |
| Swaps the current reference with another one. | |
A non-nullable pointer to one of the types in Ts...
|
inlineconstexprnoexcept |
Returns a pointer to the pointed-to type.
It is T* if there is only one type in Ts..., or void* otherwise.
|
inlineconstexprnoexcept |
Returns the index representing the type currently being referenced.
The index of the first type is 0, with subsequent types sequentially numbered.
|
inlineconstexprnoexcept |
Dereferences to the pointed-to type.
It is T& if there is only one type in Ts..., or void& otherwise.
|
inlineconstexprnoexcept |
Provides member access to the pointed-to type.
It is T* if there is only one type in Ts..., or void* otherwise.