---
name: "std::experimental::bad_any_cast"
section: "3"
platform: "linux"
package: "gcc"
version: "16.2.1+r23+gd564253eb6c8-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/std::experimental::bad_any_cast"
---

# std::experimental::bad\_any\_cast(3)

Exception class thrown by a failed any\_cast.

## NAME

std::experimental::bad\_any\_cast - Exception class thrown by a failed any\_cast.

## SYNOPSIS

\#include \<any\>

Inherits **std::bad\_cast**.

### Public Member Functions

virtual const char \* **what** () const noexcept\

## Detailed Description

Exception class thrown by a failed any\_cast.

## Member Function Documentation

### virtual const char \* std::experimental::bad\_any\_cast::what () const \[inline\], \[virtual\], \[noexcept\]

Returns a C-style character string describing the general cause of the current error.

Reimplemented from **std::bad\_cast**.

## Author

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