std::experimental::ranges::tagged<Base,Tags...>::operator=
來自 cppreference.com
< cpp | experimental | ranges | utility/tagged
tagged &operator=( tagged&& that ) = default; |
(1) | |
tagged &operator=( const tagged& that ) = default; |
(2) | |
template< class Other > requires Assignable<Base&, Other> |
(3) | |
template< class Other > requires Assignable<Base&, const Other&> |
(4) | |
template< class U > requires Assignable<Base&, U> && !Same<std::decay_t<U>, tagged> |
(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);。[編輯] 返回值
*this.