std::experimental::propagate_const<T>::operator=
来自cppreference.com
< cpp | experimental | propagate
const
constexpr
propagate_const&
operator=(
propagate_const&&
p )
= default;
|
(1) | (库基础 TS v2) |
template<class
U>
constexpr propagate_const& operator=( propagate_const<U>&& pu ); |
(2) | (库基础 TS v2) |
template<class
U>
constexpr propagate_const& operator=( U&& u ); |
(3) | (库基础 TS v2) |
propagate_const&
operator=(
const
propagate_const&
) =
delete;
|
(4) | (库基础 TS v2) |
令 t_
指代私有数据成员,即被包装的仿指针对象。
1) 显式默认化的移动赋值运算符,它从 p.t_ 移动赋值 this->t_ 。
2) 赋值 std::move(pu.t_) 给 this->t_
。
此重载只有在
此重载只有在
U
可隐式转换为 T
时才会参与重载决议。3) 赋值 std::forward<U>(u) 给 this->t_
。
此重载只有在
此重载只有在
U
可隐式转换为 T
且 std::decay_t<U> 不是
propagate_const
的特化时才会参与重载决议。4) 复制赋值运算符被显式删除。
propagate_const
不可复制。参数
p | - | 要移动的另一 propagate_const 对象
|
pu | - | 要移动的另一不同特化的 propagate_const 对象
|
u | - | 赋值给所含指针的另一对象 |
返回值
*this 。