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

# std::exception\_ptr(3)

An opaque pointer to an arbitrary exception.

## NAME

std::\_\_unspecified\_\_::exception\_ptr - An opaque pointer to an arbitrary exception.

## SYNOPSIS

\#include \<exception\>

### Public Member Functions

constexpr **exception\_ptr** (const exception\_ptr &) noexcept\
 constexpr **exception\_ptr** (exception\_ptr &&\_\_o) noexcept\
 constexpr **exception\_ptr** (nullptr\_t) noexcept\
 const class **std::type\_info** \* **\_\_cxa\_exception\_type** () const noexcept\
 constexpr **operator bool** () const noexcept\
 constexpr exception\_ptr & **operator=** (const exception\_ptr &) noexcept\
 constexpr exception\_ptr & **operator=** (exception\_ptr &&\_\_o) noexcept\
 constexpr void **swap** (exception\_ptr &) noexcept\

### Friends

constexpr friend bool **operator==** (const exception\_ptr &, const exception\_ptr &) noexcept=default\
 exception\_ptr **std::current\_exception** () noexcept\
 template\<typename \_Ex\> constexpr exception\_ptr **std::make\_exception\_ptr** (\_Ex) noexcept\
 void **std::rethrow\_exception** (exception\_ptr)\
 constexpr void **swap** (exception\_ptr &\_\_lhs, exception\_ptr &\_\_rhs)\

### Related Symbols

(Note that these are not member symbols.)  constexpr void **swap** (exception\_ptr &\_\_lhs, exception\_ptr &\_\_rhs)\

## Detailed Description

An opaque pointer to an arbitrary exception.

The actual name of this type is unspecified, so the alias std::exception\_ptr should be used to refer to it.

**Since**

C++11 (but usable in C++98 as a GCC extension)

## Author

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