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

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

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.
