std::exception::what(3)
π std::exception::what β C++ Standard Libary manual π
okay so welcome to the manual page for std::exception::what, bestie π«Ά this is the C++ Standard Libary one, and we're about to make the explanatory-string function make sense. no cap.
πΈ NAME πΈ
std::exception::what - std::exception::what
β¨ Synopsis β¨
virtual const char* what() const throw(); (until C++11)
virtual const char* what() const noexcept; (since C++11)
Returns the explanatory string. it's giving explanatory string, and that's the whole job, periodt.
π Parameters π
(none) β literally no parameters, not even one, bestie.
π Return value π
Pointer to a null-terminated string with explanatory information. The pointer is guaranteed to be valid at least until the exception object from which it is obtained is destroyed, or until a non-const member function on the exception object is called. that's the whole safety window, iykyk.
π©Ή Defect reports π©Ή
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
- DR:
LWG 108- Applied to:
C++98 - Behavior as published: it was unspecified when the returned pointer becomes invalid
- Correct behavior: specified
- Applied to:
k that's the tea. source/version: http://cppreference.com; date: 2024.06.10. bye bestie πβ¨
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms