std::unique_ptr::get
Aus cppreference.com
<metanoindex/>
<tbody> </tbody> pointer get() const; |
(seit C++11) | |
Gibt einen Zeiger auf dem verwalteten Objekt oder
nullptr wenn kein Objekt befindet sich im Besitz .Original:
Returns a pointer to the managed object or
nullptr if no object is owned.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Parameter
(None)
Original:
(none)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Rückgabewert
Zeiger auf das verwaltete Objekt oder
nullptr wenn kein Objekt im Besitz .Original:
Pointer to the managed object or
nullptr if no object is owned.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Ausnahmen
Beispiel
std::unique_ptr<string> s_p = "Hello, world!";
string* s = s_p.get();
std::cout << *s << endl;
Output:
Hello, world!
