std::experimental::propagate_const<T>:: operator=
From cppreference.net
<
cpp
|
experimental
|
propagate const
|
constexpr
propagate_const
&
operator
=
(
propagate_const
&&
p
)
=
default
;
|
(1) | (库基础技术规范 v2) |
|
template
<
class
U
>
constexpr propagate_const & operator = ( propagate_const < U > && pu ) ; |
(2) | (库基础技术规范 v2) |
|
template
<
class
U
>
constexpr propagate_const & operator = ( U && u ) ; |
(3) | (库基础技术规范 v2) |
|
propagate_const
&
operator
=
(
const
propagate_const
&
)
=
delete
;
|
(4) | (库基础技术规范 v2) |
让
t_
表示作为包装指针类对象的私有数据成员。
1)
显式默认化的移动赋值运算符,该运算符将
this
-
>
t_
从
p.
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 。