std::is_eq,...td::is_gteq(3)
okay bestie, welcome to the std::is_eq,...td::is_gteq(3) page from the C++ Standard Libary manual π
β¨ this is the whole squad of tiny constexpr bool helpers that turn a 3-way comparison result into relational-operator energy. no cap, every detail is staying.
πΈ NAME πΈ
std::is_eq,std::is_neq,std::is_lt,std::is_gt,std::is_lteq,std::is_gteqβ literally this whole friend group:std::is_eq,std::is_neq,std::is_lt,std::is_gt,std::is_lteq,std::is_gteq.
β¨ Synopsis β¨
Defined in header <compare>
constexpr bool is_eq( std::partial_ordering cmp ) noexcept; (1) (since C++20)
constexpr bool is_neq( std::partial_ordering cmp ) noexcept; (2) (since C++20)
constexpr bool is_lt( std::partial_ordering cmp ) noexcept; (3) (since C++20)
constexpr bool is_lteq( std::partial_ordering cmp ) noexcept; (4) (since C++20)
constexpr bool is_gt( std::partial_ordering cmp ) noexcept; (5) (since C++20)
constexpr bool is_gteq( std::partial_ordering cmp ) noexcept; (6) (since C++20)
These functions take a result of 3-way comparison and convert it to the result of one of the six relational operators. π«Ά
Specifically, these functions return:
cmp == 0cmp != 0cmp < 0cmp <= 0cmp > 0cmp >= 0
π Parameters π
cmpβ result of 3-way comparison.
π¦ Return value π¦
bool β result of the corresponding relational operation. periodt.
π Example π
This section is incomplete π
Reason: no example
π See also π
partial_orderingβ the result type of 3-way comparison that supports all 6 operators,(C++20)is not substitutable, and allows incomparable values(class).
π Category π
* Todo no example
mwah π source/version and date, bb: http://cppreference.com Β· 2024.06.10. That's the C++ Standard Libary page β slay and goodbye β¨π
π¦ 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