21 Language support library [language.support]

21.7 Type identification [support.rtti]

21.7.3 Class bad_Β­cast [bad.cast]

namespace std {
  class bad_cast : public exception {
  public:
    bad_cast() noexcept;
    bad_cast(const bad_cast&) noexcept;
    bad_cast& operator=(const bad_cast&) noexcept;
    const char* what() const noexcept override;
  };
}

The class bad_Β­cast defines the type of objects thrown as exceptions by the implementation to report the execution of an invalid dynamic_Β­cast expression ([expr.dynamic.cast]).

bad_cast() noexcept;

Effects: Constructs an object of class bad_Β­cast.

bad_cast(const bad_cast&) noexcept; bad_cast& operator=(const bad_cast&) noexcept;

Effects: Copies an object of class bad_Β­cast.

const char* what() const noexcept override;

Returns: An implementation-defined ntbs.

Remarks: The message may be a null-terminated multibyte string, suitable for conversion and display as a wstring ([string.classes], [locale.codecvt])