命名空间
变体
操作

std::experimental::propagate_const<T>::operator=

来自 cppreference.cn
 
 
实验性
技术规范
文件系统库 (filesystem TS)
库基础 (library fundamentals TS)
库基础 2 (library fundamentals TS v2)
库基础 3 (library fundamentals TS v3)
并行扩展 (parallelism TS)
并行扩展 2 (parallelism TS v2)
并发扩展 (concurrency TS)
并发扩展 2 (concurrency TS v2)
概念 (concepts TS)
范围 (ranges TS)
反射 (reflection TS)
数学特殊函数 (special functions TR)
实验性非TS
模式匹配
线性代数
std::execution
契约
2D图形
 
 
 
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 可隐式转换为 Tstd::decay_t<U> 不是 propagate_const 的特化时,此重载才参与重载决议。
4) 复制赋值运算符被显式删除。propagate_const 是不可复制的。

[编辑] 参数

p - 另一个要从中移动的 propagate_const 对象
pu - 另一个要从中移动的不同特化的 propagate_const 对象
u - 另一个要赋值给包含指针的对象

[编辑] 返回值

*this.