The any_cast()
function - say, for a non-const reference operand - has the following signature:
template<class T>
T any_cast(any& operand);
Why does this function not return a T&
- where the documentation says the returned value is merely
static_cast<T>(*std::any_cast<U>(&operand))
?