std::unique_ptr::get
Aus cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
<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!
Siehe auch
| liefert einen Zeiger auf das verwaltete Objekt und gibt ihn frei (öffentliche Elementfunktion) | |