Implements the class variant_storage.
More...
#include <cassert>
#include <type_traits>
#include <utility>
#include "relational.hpp"
Go to the source code of this file.
|
| template<class VariantStorage , class Callable > |
| decltype(auto) | invoke (Callable &&c, VariantStorage &&v, std::size_t which) noexcept(noexcept(invoke_variant_storage_t{}(std::forward< Callable >(c), std::forward< VariantStorage >(v), which))) |
| | Calls the provided Callable with an element of the supplied variant storage. More...
|
| |
Implements the class variant_storage.
- Author
- Ennio Barbaro
- Date
- 18 Jan 2015
template<class VariantStorage , class Callable >
| decltype(auto) invoke |
( |
Callable && |
c, |
|
|
VariantStorage && |
v, |
|
|
std::size_t |
which |
|
) |
| |
|
noexcept |
Calls the provided Callable with an element of the supplied variant storage.
- Template Parameters
-
| Callable | A model of UnaryFunction. |
- Parameters
-
| c | a Callable object, that provides a set of overloaded operator() that can accept any type in the storage |
| v | a variant_storage |
| which | The index used to interpret the value in the storage |