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

# std::future\_error(3)

Exception type thrown by futures.

## NAME

std::future\_error - Exception type thrown by futures.

## SYNOPSIS

\#include \<future\>

Inherits **std::logic\_error**.

### Public Member Functions

**future\_error** (**future\_errc** \_\_errc)\
 const **error\_code** & **code** () const noexcept\
 virtual const char \* **what** () const noexcept\

### Friends

void **\_\_throw\_future\_error** (int)\

## Detailed Description

Exception type thrown by futures.

**Since**

C++11

## Member Function Documentation

### virtual const char \* std::future\_error::what () const \[virtual\], \[noexcept\]

Returns a C-style character string describing the general cause of the current error (the same string passed to the ctor).

Reimplemented from **std::logic\_error**.

## Author

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