operator==, <=> (std::indirect)
|
ヘッダーで定義
<memory>
|
||
|
二つの
indirect
オブジェクトを比較
|
||
|
template
<
class
U,
class
A
>
constexpr
bool
operator
==
(
const
indirect
&
lhs,
const
indirect
<
U, A
>
&
rhs
)
|
(1) | (C++26以降) |
|
template
<
class
U,
class
A
>
constexpr
/*synth-three-way-result*/
<
T, U
>
|
(2) | (C++26以降) |
indirect
オブジェクトと値を比較
|
||
|
template
<
class
U
>
constexpr
bool
operator
==
(
const
indirect
&
ind,
const
U
&
value
)
|
(3) | (C++26以降) |
|
template
<
class
U
>
constexpr
/*synth-three-way-result*/
<
T, U
>
|
(4) | (C++26以降) |
indirect
オブジェクトに対する比較操作を実行します。
/*synth-three-way-result*/ の定義については、 synth-three-way-result を参照してください。
indirect
オブジェクトを比較します。比較結果は以下のように定義されます:
| 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
オブジェクトと値を比較する場合、比較結果は以下のように定義されます:
| 演算子 | ind が値を持たない場合 | ind が値を持つ場合 |
|---|---|---|
| operator == | false | * ind == value |
| operator <=> | std :: strong_ordering :: less | synth-three-way ( * ind, value ) |
パラメータ
| lhs, rhs, ind | - |
比較対象の
indirect
オブジェクト
|
| value | - | 所有値と比較する値 |
戻り値
上記の通り。
例
|
このセクションは不完全です
理由: 例がありません |