STD::EXCEPTION_PTR(3)

πŸ’– NAME πŸ’–

std::__unspecified__::exception_ptr β€” an opaque pointer to an arbitrary exception. That's it, that's the whole vibe. It points at some exception, doesn't tell you which, keeps it mysterious. Main character energy fr. ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <exception>

πŸ‘‘ Public Member Functions

okay bestie, here's the whole roster of things this type can do, no skips, no cuts:

  • constexpr exception_ptr (const exception_ptr &) noexcept β€” copy constructor, and it's constexpr and noexcept because of course it is πŸ’…
  • constexpr exception_ptr (exception_ptr &&__o) noexcept β€” move constructor. It takes __o and it moves. Slay.
  • constexpr exception_ptr (nullptr_t) noexcept β€” build one from nullptr_t. Yes, from the literal null pointer type. Iconic.
  • const class std::type_info * __cxa_exception_type () const noexcept β€” hands you back a const class std::type_info *, and it's const noexcept because it's not out here starting drama.
  • constexpr operator bool () const noexcept β€” lets you use it in a boolean context, constexpr and noexcept, so you can vibe check it.
  • constexpr exception_ptr & operator= (const exception_ptr &) noexcept β€” copy assignment, returns a reference to yourself, constexpr, noexcept.
  • constexpr exception_ptr & operator= (exception_ptr &&__o) noexcept β€” move assignment, takes __o, returns exception_ptr &, constexpr, noexcept.
  • constexpr void swap (exception_ptr &) noexcept β€” swaps, returns void, constexpr, noexcept. Very demure, very mindful.

🫢 Friends

these ones are friends, not members, so they get to hang out in the class's inner circle:

  • constexpr friend bool operator== (const exception_ptr &, const exception_ptr &) noexcept=default β€” the equality bestie. constexpr, friend, bool, noexcept=default. She's defaulted and she's thriving.
  • exception_ptr std::current_exception () noexcept β€” returns the exception_ptr for whatever exception is happening right now, noexcept.
  • template<typename _Ex> constexpr exception_ptr std::make_exception_ptr (_Ex) noexcept β€” templated on _Ex, constexpr, noexcept, and it makes you an exception_ptr out of an _Ex. Chef's kiss. πŸŽ€
  • void std::rethrow_exception (exception_ptr) β€” takes an exception_ptr, returns void, and throws that exception back out into the world. Chaotic but valid.
  • constexpr void swap (exception_ptr &__lhs, exception_ptr &__rhs) β€” the free-function swap, takes __lhs and __rhs, returns void, constexpr.

(Note that these are not member symbols.) β€” like, they're adjacent, they're in the group chat, but they are not members. Respect the boundary.
  • constexpr void swap (exception_ptr &__lhs, exception_ptr &__rhs) β€” yeah, she shows up twice. Once as a friend, once here. She contains multitudes. πŸ’œ

⭐ 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. Like, the real name is a secret, okay?? Don't try to @ her directly, just use the alias. iykyk. πŸ™ˆ

Since

C++11 (but usable in C++98 as a GCC extension) β€” so yes, she's a modern girl but she can time-travel back to C++98 if GCC lets her. Lowkey iconic.


✨ Author ✨

Generated automatically by Doxygen for libstdc++ from the source code. Not a human, just a robot doing its little robot thing, and honestly? It ate. πŸ€–πŸ’…


k byeeee bestie, this page came to you from libstdc++ and it lives at std::__uns...ception_ptr(3) β€” the manpage name got truncated mid-word and we respect that choice 🫢 go forth and catch them all πŸ’–

πŸ“¦ where this page comes from
  • arch rolling: gcc 16.2.1+r23+gd564253eb6c8-1 Β· GPL-3.0-or-later WITH GCC-exception-3.1 AND GFDL-1.3-or-later
  • fedora 44: libstdc++-docs 16.2.1-2.fc44
  • fedora 44: libstdc++-docs 16.2.1-3.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms