std::unique_ptr::get
Da cppreference.com.
< cpp | memory | unique ptr
![]() |
Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate.
La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui. |
pointer get() const; |
(dal C++11) | |
Restituisce un puntatore all'oggetto gestito o nullptr se nessun oggetto è di proprietà.
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.
Indice |
[modifica] Parametri
(Nessuno)
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.
[modifica] Valore di ritorno
Puntatore l'oggetto gestito o nullptr se nessun oggetto è di proprietà.
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.
[modifica] Eccezioni
[modifica] Esempio
std::unique_ptr<string> s_p = "Hello, world!"; string* s = s_p.get(); std::cout << *s << endl;
Output:
Hello, world!
[modifica] Vedi anche
restituisce un puntatore all'oggetto gestito e rilascia la proprietà Original: returns a pointer to the managed object and releases the ownership The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (metodo pubblico) |