std::shared_ptr::operator<< - cppreference.com
Da cppreference.com.
|
|
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. |
<metanoindex/>
<tbody> </tbody>
|
|
||
Inserisce un shared_ptr<T> in un std::basic_ostream.
Original:
Inserts a shared_ptr<T> into a std::basic_ostream.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Equivalente a os << ptr.get().
Original:
Equivalent to os << ptr.get().
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Parametri
| os | - | un std::basic_ostream da inserire in Original: a std::basic_ostream to insert The text has been machine-translated via Google Translate. |
| ptr | - | i dati da inserire nella Original: the data to be inserted into The text has been machine-translated via Google Translate. |
Valore di ritorno
os
Esempio
#include <iostream> #include <memory> class Foo {}; int main() { auto sp = std::make_shared<Foo>(); std::cout << sp << std::endl; std::cout << sp.get() << std::endl; }
Possible output:
Vedi anche
restituisce un puntatore all'oggetto gestito Original: returns a pointer to the managed object The text has been machine-translated via Google Translate. (metodo pubblico) [modifica] | |