19
General utilities library
[utilities]
19.11
Smart pointers
[smartptr]
19.11.1
Class template
unique_ptr
[unique.ptr]
19.11.1.3
unique_ptr
for array objects with a runtime length
[unique.ptr.runtime]
19.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, except that it shall not participate in overload resolution unless all of the following conditions hold, where
UP
is
unique_ptr<U, E>
:
(1.1)
U
is an array type, and
(1.2)
pointer
is the same type as
element_type*
, and
(1.3)
UP::pointer
is the same type as
UP::element_type*
, and
(1.4)
UP::element_type(*)[]
is convertible to
element_type(*)[]
, and
(1.5)
is_assignable_v<D&, E&&>
is
true
.
[
 
Note
:
This replaces the overload-resolution specification of the primary template
—
 
end note
 
]