std::regex_error(3)

std::regex_error3

A regular expression exception class.

Usage

#include <regex>

Inherits std::runtime_error.

Public Member Functions

regex_error (error_type __ecode)
Constructs a regex_error object. regex_constants::error_type code () const noexcept
Gets the regex error code. virtual const char * what () const noexcept

Detailed Description

A regular expression exception class.

The regular expression library throws objects of this class on error.

Since

C++11

Constructor & Destructor Documentation

std::regex_error::regex_error (error_type __ecode) [explicit]

Constructs a regex_error object.

Parameters

__ecode the regex error code.

References regex_error().

Referenced by regex_error().

Member Function Documentation

regex_constants::error_type std::regex_error::code () const [inline], [noexcept]

Gets the regex error code.

Returns

the regex error code.

References code().

Referenced by code().

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::experimental::filesystem::v1::filesystem_error, std::filesystem::filesystem_error, and std::ios_base::failure.

References what().

Referenced by what().

Releases

2 releases since Debian 5.0 (Lenny); the text changed 1 time.

  1. 5.0
  2. Arch

Author

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

From gcc 16.2.1+r23+gd564253eb6c8-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.