std::basic_istream<CharT,Traits>::~basic_istream (3) - Linux Manuals
std::basic_istream<CharT,Traits>::~basic_istream: std::basic_istream<CharT,Traits>::~basic_istream
Command to display std::basic_istream<CharT,Traits>::~basic_istream
manual in Linux: $ man 3 std::basic_istream<CharT,Traits>::~basic_istream
NAME
std::basic_istream<CharT,Traits>::~basic_istream - std::basic_istream<CharT,Traits>::~basic_istream
Synopsis
virtual ~basic_istream();
Destructs the input stream.
Notes
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.
Example
// Run this code
#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
Pages related to std::basic_istream<CharT,Traits>::~basic_istream
- std::basic_istream<CharT,Traits>::basic_istream (3) - std::basic_istream<CharT,Traits>::basic_istream
- std::basic_istream<CharT,Traits>::gcount (3) - std::basic_istream<CharT,Traits>::gcount
- std::basic_istream<CharT,Traits>::get (3) - std::basic_istream<CharT,Traits>::get
- std::basic_istream<CharT,Traits>::getline (3) - std::basic_istream<CharT,Traits>::getline
- std::basic_istream<CharT,Traits>::ignore (3) - std::basic_istream<CharT,Traits>::ignore
- std::basic_istream<CharT,Traits>::operator= (3) - std::basic_istream<CharT,Traits>::operator=
- std::basic_istream<CharT,Traits>::operator>> (3) - std::basic_istream<CharT,Traits>::operator>>
- std::basic_istream<CharT,Traits>::peek (3) - std::basic_istream<CharT,Traits>::peek
- std::basic_istream<CharT,Traits>::putback (3) - std::basic_istream<CharT,Traits>::putback
- std::basic_istream<CharT,Traits>::read (3) - std::basic_istream<CharT,Traits>::read
- std::basic_istream<CharT,Traits>::readsome (3) - std::basic_istream<CharT,Traits>::readsome
- std::basic_istream<CharT,Traits>::seekg (3) - std::basic_istream<CharT,Traits>::seekg
- std::basic_istream<CharT,Traits>::sentry (3) - std::basic_istream<CharT,Traits>::sentry
- std::basic_istream<CharT,Traits>::swap (3) - std::basic_istream<CharT,Traits>::swap
- std::basic_istream<CharT,Traits>::sync (3) - std::basic_istream<CharT,Traits>::sync
- std::basic_istream<CharT,Traits>::tellg (3) - std::basic_istream<CharT,Traits>::tellg
- std::basic_istream<CharT,Traits>::unget (3) - std::basic_istream<CharT,Traits>::unget
- std::basic_istream (3) - std::basic_istream
- std::basic_istream_sentry (3)
- std::basic_istringstream (3) - std::basic_istringstream