std::indirect<T, Allocator>:: operator=
|
constexpr
indirect
&
operator
=
(
const
indirect
&
other
)
;
|
(1) | (C++26以降) |
|
constexpr
indirect
&
operator
=
(
indirect
&&
other
)
noexcept
(
/* 詳細は後述 */
)
;
|
(2) | (C++26以降) |
|
template
<
class
U
=
T
>
constexpr indirect & operator = ( U && value ) ; |
(3) | (C++26以降) |
* this の内容を value または other の内容で置き換えます。
traits
を
std::
allocator_traits
<
Allocator
>
とします:
alloc
は
other.
alloc
のコピーで置き換えられます。
alloc
を使用して
std::
forward
<
U
>
(
value
)
で所有するオブジェクトを構築する。それ以外の場合、
**
this
=
std::
forward
<
U
>
(
value
)
と等価。
- std:: is_same_v < std:: remove_cvref_t < U > , std :: indirect > が false であること。
- std:: is_constructible_v < T, U > が true であること。
- std:: is_assignable_v < T & , U > が true であること。
目次 |
パラメータ
| other | - |
所有されている値(存在する場合)が代入に使用される別の
indirect
オブジェクト
|
| value | - | 所有されている値に代入または構築する値 |
戻り値
* this
例外
T
の選択されたコピーコンストラクタの呼び出し中に例外がスローされた場合、何の効果もありません。
propagate_on_container_move_assignment
::
value
例
|
このセクションは不完全です
理由: 例がありません |