std::error_...r_condition(3)
okay so bestie, this is the std::error_...r_condition(3) page from the C++ Standard Libary manual β yes, that is literally how the manual name is spelled on the page, no cap π. The function we're obsessing over is std::error_category::default_error_condition, and she's virtual and iconic, periodt π
.
β¨ NAME β¨
std::error_category::default_error_conditionβstd::error_category::default_error_condition
like, yes bestie, the name is listed twice on the page. we keep it π.
πΈ Synopsis πΈ
virtual std::error_condition default_error_condition( int val ) const
(since C++11)
noexcept;
Okay so this function returns the error condition for the given error value. It's equivalent to std::error_condition(val, *this). slay π
.
Classes derived from error_category may override this function to map certain error values to a generic category. For example, std::system_category overrides this function to map the error values that match POSIX errno values to std::generic_category. That's the whole vibe check, fr fr π.
π Parameters π
valβ error value for which to return error condition
not me explaining val in one little line, but yes, that's the whole parameter list π«Ά.
π¦ Return value π¦
The error condition for the given error code.
lowkey note that the original says "error code" here even though the rest is saying "error value" β we are not fixing it, we are preserving it exactly, iykyk π.
mwah π this cute little page came from http://cppreference.com, dated 2024.06.10, and the page title is std::error_...r_condition(3). bye bestie, go map those error conditions πβ¨
π¦ 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