std::any::type - cppreference.com

##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# std::any::type

From cppreference.com
< cpp‎ | utility‎ | any

const type_info& type() const; |  | (since C++17)

Queries the contained type.

### [edit] Parameters

(none)

### [edit] Return value

The `typeid` of the contained value if instance is non-empty, otherwise typeid(void).

### [edit] Exceptions

`noexcept` specification:
noexcept
Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/utility/any/type&oldid=91718"
Category:

- unconditionally noexcept

Hidden categories:

- Pages with unreviewed unconditional noexcept template
- Pages with unreviewed noexcept template