std::unique_ptr::unique_ptr
From cppreference.com
< cpp | memory | unique ptr
constexpr unique_ptr(); |
(1) | (since C++11) |
explicit unique_ptr( pointer p ); |
(2) | (since C++11) |
unique_ptr( pointer p, d1 ); |
(3) | (since C++11) |
unique_ptr( pointer p, d2 ); |
(4) | (since C++11) |
unique_ptr( unique_ptr&& u ); |
(5) | (since C++11) |
constexpr unique_ptr( nullptr_t ); |
(6) | (since C++11) |
template< class U, class E > unique_ptr( unique_ptr<U, E>&& u ); |
(7) | (since C++11) |
template< class U > unique_ptr( auto_ptr<U>&& u ); |
(8) | (since C++11) |
1) Constructs an empty std::unique_ptr.
2) Constructs a std::unique_ptr which owns p, initializing the stored pointer with p and value-initializing the stored deleter.
3)
4)
5) Constructs a unique_ptr by transferring ownership from u to *this.
6)
7)
8)
[edit] Parameters
This section is incomplete |