Access the contained object.
- Template Parameters
-
| _ValueType | A reference or CopyConstructible type. |
- Parameters
-
| __any | The object to access. |
- Returns
- The contained object.
- Exceptions
-
| bad_any_cast | If
__any.type() != typeid(remove_reference_t<_ValueType>)
|
Definition at line 396 of file experimental/any.
397 {
399 "Template argument must be a reference or CopyConstructible type");
401 if (__p)
402 return *__p;
403 __throw_bad_any_cast();
404 }
_ValueType any_cast(const any &__any)
Access the contained object.
static constexpr bool __is_valid_cast()