operator==, <=>(std::indirect)
From cppreference.com
C++
Feature test macros (C++20)
Concepts library (C++20)
Metaprogramming library (C++11)
Ranges library (C++20)
Filesystem library (C++17)
Concurrency support library (C++11)
Execution control library (C++26)
Memory management library
Uninitialized memory algorithms
Constrained uninitialized memory algorithms
Memory resources
Uninitialized storage (until C++20)
Garbage collector support (until C++23)
(exposition only*)
(C++11)
(C++23)
(C++11)
(C++17)
(C++11)
(C++11)
(C++20)
(C++20)
(C++17)
(C++11)
(C++17)
(C++20)
(C++17)
(C++17)
(C++17)
(C++17)
(C++17)
(C++17)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++17)
(C++17)
(C++17)
(C++17)
(C++17)
(C++17)
(C++17)
(C++17)
(until C++20*)
(until C++20*)
(until C++20*)
(C++11)(until C++23)
(C++11)(until C++23)
(C++11)(until C++23)
(C++11)(until C++23)
(C++11)(until C++23)
(C++11)(until C++23)
(C++11)
(C++11)
(C++17)
(C++20)
(C++17)
(C++11)
(C++11)
(C++11)
(until C++17*)
(C++11)
(C++17)
(C++26)
(C++26)
(C++11)
(C++11)
(C++11)
(C++23)
(C++23)
(C++11)
(C++20)
(C++11)
(C++11)
(C++20)
(C++26)
std::indirect
operator==operator<=>
Defined in header
<memory>
Compare two
indirect
objectstemplate< class U, class A >
(1)
(since C++26)
constexpr bool operator==( const indirect& lhs, const indirect<U, A>& rhs )
template< class U, class A >
(2)
(since C++26)
constexpr /*synth-three-way-result*/<T, U>
Compare an
indirect
object with a valuetemplate< class U >
(3)
(since C++26)
constexpr bool operator==( const indirect& ind, const U& value )
template< class U >
(4)
(since C++26)
constexpr /*synth-three-way-result*/<T, U>
Performs comparison operations on indirect
objects.
For the definition of /*synth-three-way-result*/, see synth-three-way-result .
1,2) Compares two
indirect
objects, the comparison result is defined as follows:
lhs | valueless | not valueless | ||
---|---|---|---|---|
rhs | valueless | not valueless | valueless | not valueless |
operator== | true | false | false | *lhs == *rhs |
operator<=> | !lhs.valueless_after_move() <=> !rhs.valueless_after_move() |
synth-three-way (*lhs, *rhs)
|
1) If the expression *lhs == *rhs is ill-formed or its result is not convertible to bool, the program is ill-formed.
3,4) Compare an
indirect
object with a value, the comparison result is defined as follows:
Operator | ind is valueless | ind is not valueless |
---|---|---|
operator== | false | *ind == value |
operator<=> | std::strong_ordering::less | synth-three-way (*ind, value) |
3) If the expression *ind == value is ill-formed or its result is not convertible to bool, the program is ill-formed.
[edit] Parameters
lhs, rhs, ind
-
an
indirect
object to compare
value
-
value to compare to the owned value
[edit] Return value
As described above.
[edit] Example
This section is incomplete
Reason: no example
Reason: no example