---
name: "std::bad_weak_ptr"
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::bad_weak_ptr/3cxx"
---

# std::bad\_weak\_ptr(3cxx)

Exception possibly thrown by shared\_ptr.

## NAME

std::bad\_weak\_ptr - Exception possibly thrown by `shared_ptr`.

## SYNOPSIS

`#include <memory>`

Inherits **std::exception**.

### Public Member Functions

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

## Detailed Description

Exception possibly thrown by `shared_ptr`.

## Member Function Documentation

### virtual char const \* std::bad\_weak\_ptr::what () const` [virtual]`, ` [noexcept]`

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

Reimplemented from **std::exception**.

## Author

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