std::regex_error(3)

✨ NAME ✨

std::regex_error β€” a regular expression exception class, bestie. it's the little diva that gets thrown when your regex goes feral πŸ’…

it lives in the Library Functions Manual, section 3 (iykyk, that's the library-functions girlies) πŸŽ€


🌸 SYNOPSIS 🌸

#include <regex>

Inherits std::runtime_error. yes queen, it's part of the runtime_error family tree 🌳✨

🫢 Public Member Functions

  • regex_error (error_type __ecode) β€” constructs a regex_error object, no cap
  • regex_constants::error_type code () const noexcept β€” gets the regex error code
  • virtual const char * what () const noexcept β€” the inherited vibes-checker

πŸ’– Detailed Description πŸ’–

okay so. std::regex_error is a regular expression exception class. that's the whole personality, and honestly? iconic.

the regular expression library throws objects of this class on error. so when your regex is giving absolutely nothing but chaos, this is the cutie that shows up to tell you πŸ’€

Since β€” C++11 ⭐ (an elder, but a young elder)


πŸŽ€ Constructor & Destructor Documentation πŸŽ€

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

constructs a regex_error object. slay.

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. that's it, that's the function, and it's doing its job flawlessly ✨

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). so like, the receipts of whatever went wrong, verbatim, no paraphrasing πŸ“

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().

heads up bestie: this one is inherited from std::runtime_error, so it's not regex_error's own original work β€” she's repping the family legacy 🫢

πŸ‘‘ Author πŸ‘‘

generated automatically by Doxygen for libstdc++ from the source code. not a human author, just a robot doing its little robot thing πŸ€–πŸ’…


and that's the whole page, periodt πŸ’– this beauty came to you from libstdc++, served up by the Library Functions Manual β€” no date on the tag, so just vibe with the version, k? bye babes πŸŽ€βœ¨πŸ¦‹

πŸ“¦ 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
  • centos-stream 10: gcc-toolset-16-libstdc++-docs 16.2.1-1.3.el10 Β· 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
  • 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