boost::any_cast
// In header: <boost/any.hpp> template<typename ValueType> ValueType any_cast(any && operand);
Returns:
ValueType stored in operand, leaving the operand empty.
ValueType
operand
Throws: