20
General utilities library
[utilities]
20.11
Smart pointers
[smartptr]
20.11.1
Class template
unique_ptr
[unique.ptr]
20.11.1.3
unique_ptr
for array objects with a runtime length
[unique.ptr.runtime]
20.11.1.3.2
Assignment
[unique.ptr.runtime.asgn]
🔗
template
<
class
U,
class
E
>
unique_ptr
&
operator
=
(
unique_ptr
<
U, E
>
&
&
u
)
noexcept
;
1
#
This operator behaves the same as in the primary template
.
2
#
Constraints:
Where
UP
is
unique_ptr
<
U, E
>
:
(2.1)
U
is an array type, and
(2.2)
pointer
is the same type as
element_type
*
, and
(2.3)
UP
::
pointer
is the same type as
UP
::
element_type
*
, and
(2.4)
UP
::
element_type
(
*
)
[
]
is convertible to
element_type
(
*
)
[
]
, and
(2.5)
is_assignable_v
<
D
&
, E
&
&
>
is
true
.
[
Note
:
This replaces the
Constraints:
specification of the primary template
.
—
end note
]