Defined in header <compare> | ||
---|---|---|
template< class T > constexpr std::strong_equality strong_equal(const T& a, const T& b); | (since C++20) |
Compares two values using 3-way comparison and produces a result of type std::strong_equality
.
Specifically,
a <=> b
is well-formed and its result is convertible to std::strong_equality
, returns that result. a <=> b
is well-formed, but its result is not convertible to std::strong_equality
, then the function is defined as deleted. a <=> b
is ill-formed, but the expression a == b
is well-formed and convertible to bool
, a == b
is true
, returns std::strong_equality::equal
std::strong_equality::nonequal
a, b | - | values to compare |
A value of type std::strong_equality
, as described above.
(C++20) | the result type of 3-way comparison that supports only equality/inequality and is substitutable (class) |
(C++20) | performs 3-way comparison and produces a result of type std::strong_ordering (function template) |
(C++20) | performs 3-way comparison and produces a result of type std::partial_ordering (function template) |
(C++20) | performs 3-way comparison and produces a result of type std::weak_ordering (function template) |
(C++20) | performs 3-way comparison and produces a result of type std::weak_equality (function template) |
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/utility/compare/strong_equal