名前空間
変種
操作

std::experimental::ranges::tagged<Base,Tags...>::operator=

From cppreference.com
 
 
 
 
汎用ユーティリティライブラリ
ユーティリティコンポーネント
関数オブジェクト
メタプログラミングと型特性
タグ付きペアとタプル
                          
タグ指定子
                                      
                          
 
 
tagged &operator=( tagged&& that ) = default;
(1)
tagged &operator=( const tagged& that ) = default;
(2)
template< class Other >

    requires Assignable<Base&, Other>
constexpr tagged& operator=( ranges::tagged<Other, Tags...>&& that )

    noexcept(std::is_nothrow_assignable<Base&, Other>::value);
(3)
template< class Other >

    requires Assignable<Base&, const Other&>

constexpr tagged& operator=( const ranges::tagged<Other, Tags...>& that );
(4)
template< class U >

    requires Assignable<Base&, U> && !Same<std::decay_t<U>, tagged>

constexpr tagged& operator=( U&& that ) noexcept(std::is_nothrow_assignable<Base&, U>::value);
(5)

that の内容を *this に代入します。

1,2) `tagged` は、`Base` の対応する代入演算子を呼び出す、デフォルトのコピー代入演算子とムーブ代入演算子を持ちます。
3) タグが一致する別の `tagged` スペシャライゼーションからの変換ムーブ代入。 static_cast<Base&>(*this) = static_cast<Other&&>(that); と同等です。
4) タグが一致する別の `tagged` スペシャライゼーションからの変換コピー代入。 static_cast<Base&>(*this) = static_cast<const Other&>(that); と同等です。
5) `Base` サブオブジェクトに that を代入します。 static_cast<Base&>(*this) = std::forward<U>(that); と同等です。

[編集] 戻り値

*this.

English 日本語 中文(简体) 中文(繁體)