名稱空間
變體
操作

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

來自 cppreference.com
 
 
實驗性
技術規範
檔案系統庫 (檔案系統 TS)
庫基礎 (庫基礎 TS)
庫基礎 2 (庫基礎 TS v2)
庫基礎 3 (庫基礎 TS v3)
並行性擴充套件 (並行性 TS)
並行性擴充套件 2 (並行性 TS v2)
併發性擴充套件 (併發性 TS)
併發擴充套件 2 (concurrency TS v2)
概念 (概念 TS)
範圍 (範圍 TS)
反射 (反射 TS)
數學特殊函式 (特殊函式 TR)
實驗性非 TS
模式匹配
線性代數
std::execution
契約
2D 圖形
 
 
通用工具庫
實用元件
函式物件
超程式設計和型別特徵
帶標籤的對和元組
                          
tag specifiers
                                      
                          
 
 
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)that 賦值給 Base 子物件。等價於 static_cast<Base&>(*this) = std::forward<U>(that);

[編輯] 返回值

*this.