std::shared_ptr::operator<< – cppreference.com
Aus cppreference.com
<metanoindex/>
<tbody> </tbody>
|
|
||
Fügt eine shared_ptr<T> in eine 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.
Entspricht 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.
Parameter
| os | - | a std::basic_ostream um Original: a std::basic_ostream to insert The text has been machine-translated via Google Translate. |
| ptr | - | die Daten mit der Original: the data to be inserted into The text has been machine-translated via Google Translate. |
Rückgabewert
os
Beispiel
#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:
Siehe auch
| liefert einen Zeiger auf das verwaltete Objekt (öffentliche Elementfunktion) [edit] | |