Accessing The Stored Value
Here are discussed the different modes of accessing a stored value in std::any.
We'll cover the following...
To access the currently active value in std::any
you have one option:
std::any_cast<T>()
.
The function has three “modes” you can work with:
- read access - takes
std::any
as a reference, returns a copy of