public member function
<typeindex>

std::type_index::name

const char* name() const;
const char* name() const noexcept;
Get type name
Returns a null-terminated character sequence that may identify the type currently referenced to by the object.

Internally, the function simply returns the result of calling member name on the type_info it refers to.

Parameters

none

Return Value

A c-string with the name of the type.

Data races

No data races are initiated by this member function.

Exception safety

No-throw guarantee: never throws exceptions.

See also