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

# std::range\_error(3cxx)

## NAME

std::range\_error

## SYNOPSIS

`#include <stdexcept>`

Inherits **std::runtime\_error**.

### Public Member Functions

**range\_error** (const char \*) \_GLIBCXX\_TXN\_SAFE\
 **range\_error** (const **range\_error** &)=**default**\
 **range\_error** (const **string** &\_\_arg) \_GLIBCXX\_TXN\_SAFE\
 **range\_error** (**range\_error** &&)=**default**\
 **range\_error** & **operator=** (const **range\_error** &)=**default**\
 **range\_error** & **operator=** (**range\_error** &&)=**default**\
 **virtual** const char \* **what** () const noexcept\

## Detailed Description

Thrown to indicate range errors in internal computations. \

## Member Function Documentation

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

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

Reimplemented from **std::exception**.

Reimplemented in **std::filesystem::filesystem\_error**, and **std::experimental::filesystem::v1::filesystem\_error**.

## Author

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