operator==, <=> (std::indirect)
|
Defined in header
<memory>
|
||
|
Compare two
indirect
objects
|
||
|
template
<
class
U,
class
A
>
constexpr
bool
operator
==
(
const
indirect
&
lhs,
const
indirect
<
U, A
>
&
rhs
)
|
(1) | (since C++26) |
|
template
<
class
U,
class
A
>
constexpr
/*synth-three-way-result*/
<
T, U
>
|
(2) | (since C++26) |
|
Compare an
indirect
object with a value
|
||
|
template
<
class
U
>
constexpr
bool
operator
==
(
const
indirect
&
ind,
const
U
&
value
)
|
(3) | (since C++26) |
|
template
<
class
U
>
constexpr
/*synth-three-way-result*/
<
T, U
>
|
(4) | (since C++26) |
Performs comparison operations on
indirect
objects.
For the definition of /*synth-three-way-result*/ , see synth-three-way-result .
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
)
|
||
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 ) |
Parameters
| lhs, rhs, ind | - |
an
indirect
object to compare
|
| value | - | value to compare to the owned value |
Return value
As described above.
Example
|
This section is incomplete
Reason: no example |