std::basic_istream::~basic_istream
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> virtual ~basic_istream(); |
||
Distrugge il flusso di input.
Original:
Destructs the input stream.
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.
Note
Questo distruttore non si esegue alcuna operazione sul streambuffer sottostante (
rdbuf()): i distruttori dei flussi di input derivati come std::basic_ifstream e std::basic_istringstream sono responsabili per chiamare i distruttori delle streambuffers.Original:
This destructor does not perform any operation on the underlying streambuffer (
rdbuf()): the destructors of the derived input streams such as std::basic_ifstream and std::basic_istringstream are responsible for calling the destructors of the streambuffers.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.
Esempio
#include <sstream>
#include <iostream>
void print_stringbuf(std::streambuf* p)
{
std::istream buf(p); // buf shares the buffer with s1
int n;
buf >> n;
std::cout << n;
} // calls the destructor of buf. p remains unaffected
int main()
{
std::istringstream s1("10 20");
print_stringbuf(s1.rdbuf());
int n;
s1 >> n;
std::cout << ',' << n << '\n';
}
Output:
10,20