std::error_...::equivalent(3)
πΈ NAME πΈ
okay bestie, welcome to std::error_...::equivalent(3) from the C++ Standard Libary manual β¨ (yes, that's the manual name, keeping it exactly as it is). This page is all about std::error_category::equivalent β and the name line is literally std::error_category::equivalent again, which is giving main character energy π
.
β¨ Synopsis β¨
so std::error_category::equivalent has two virtual overloads, both since C++11 π«Ά. They check whether an error code is equivalent to an error condition for the error category represented by *this.
- (since C++11)
virtual bool equivalent( int code, const std::error_condition& condition ) const noexcept; - (since C++11)
virtual bool equivalent( const std::error_code& code, int condition ) const noexcept;
what they actually do, lowkey:
- Overload
1is equivalent todefault_error_condition(code) == condition. - Overload
2is equivalent to*this == code.category() && code.value() == condition.
π Parameters π
codeβ specifies the error code to compare.conditionβ specifies the error condition to compare.
π Return value π
true if the error code is equivalent to the given error condition for the error category represented by *this, false otherwise. periodt π
β¨
okay bestie, that's the whole page π«Ά β source/version vibes: http://cppreference.com, and the date on this one is 2024.06.10. mwah ππ
π¦ 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