---
name: "std::type_info"
section: "3cxx"
platform: "linux"
package: "libstdc++-12-doc"
version: "12.4.0-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/std::type_info/3cxx"
---

# std::type\_info(3cxx)

Part of RTTI.

## NAME

std::type\_info - Part of RTTI.

## SYNOPSIS

`#include <typeinfo>`

Inherited by \_\_cxxabiv1::\_\_array\_type\_info, \_\_cxxabiv1::\_\_class\_type\_info, \_\_cxxabiv1::\_\_enum\_type\_info, \_\_cxxabiv1::\_\_function\_type\_info, \_\_cxxabiv1::\_\_fundamental\_type\_info, and \_\_cxxabiv1::\_\_pbase\_type\_info.

### Public Member Functions

**virtual** **~type\_info** ()\
 **virtual** bool **\_\_do\_catch** (const **type\_info** \***\_\_thr\_type**, **void** \*\***\_\_thr\_obj**, unsigned **\_\_outer**) const\
 **virtual** bool **\_\_do\_upcast** (const \_\_cxxabiv1::\_\_class\_type\_info \***\_\_target**, **void** \*\***\_\_obj\_ptr**) const\
 **virtual** bool **\_\_is\_function\_p** () const\
 **virtual** bool **\_\_is\_pointer\_p** () const\
 bool **before** (const **type\_info** &\_\_arg) const noexcept\
 size\_t **hash\_code** () const noexcept\
 const char \* **name** () const noexcept\
 constexpr bool **operator==** (const **type\_info** &\_\_arg) const noexcept\

### Protected Member Functions

**type\_info** (const char \*\_\_n)\

### Protected Attributes

const char \* **\_\_name**\

## Detailed Description

Part of RTTI.

The `type_info` class describes type information generated by an implementation.

## Constructor & Destructor Documentation

### virtual std::type\_info::~type\_info ()` [virtual]`

Destructor first. Being the first non-inline virtual function, this controls in which translation unit the vtable is emitted. The compiler makes use of that information to know where to emit the runtime-mandated type\_info structures in the new-abi. \

## Member Function Documentation

### bool std::type\_info::before (const type\_info & \_\_arg) const` [noexcept]`

Returns true if `*this` precedes `__arg` in the implementation's collation order. \

### const char \* std::type\_info::name () const` [inline]`, ` [noexcept]`

Returns an *implementation-defined* byte string; this is not portable between compilers! \

## Author

Generated automatically by Doxygen for libstdc++ from the source code.
