std::basic_ostream<CharT,Traits>::~basic_ostream (3) - Linux Manuals
std::basic_ostream<CharT,Traits>::~basic_ostream: std::basic_ostream<CharT,Traits>::~basic_ostream
Command to display std::basic_ostream<CharT,Traits>::~basic_ostream
manual in Linux: $ man 3 std::basic_ostream<CharT,Traits>::~basic_ostream
NAME
std::basic_ostream<CharT,Traits>::~basic_ostream - std::basic_ostream<CharT,Traits>::~basic_ostream
Synopsis
virtual ~basic_ostream();
Destroys the basic_ostream object. This destructor does not perform any operation on the underlying streambuffer (rdbuf()): the destructors of the derived output streams such as std::basic_ofstream and std::basic_ostringstream are responsible for calling the destructors of the stream buffers.
Example
// Run this code
#include <sstream>
#include <iostream>
void add_words(std::streambuf* p)
{
std::ostream buf(p); // buf shares the buffer with s
buf << " is the answer";
} // calls the destructor of buf. p remains unaffected
int main()
{
std::ostringstream s;
s << 42;
add_words(s.rdbuf());
s << ".";
std::cout << s.str() << '\n';
}
Output:
42 is the answer.
Pages related to std::basic_ostream<CharT,Traits>::~basic_ostream
- std::basic_ostream<CharT,Traits>::basic_ostream (3) - std::basic_ostream<CharT,Traits>::basic_ostream
- std::basic_ostream<CharT,Traits>::flush (3) - std::basic_ostream<CharT,Traits>::flush
- std::basic_ostream<CharT,Traits>::operator<< (3) - std::basic_ostream<CharT,Traits>::operator<<
- std::basic_ostream<CharT,Traits>::operator= (3) - std::basic_ostream<CharT,Traits>::operator=
- std::basic_ostream<CharT,Traits>::put (3) - std::basic_ostream<CharT,Traits>::put
- std::basic_ostream<CharT,Traits>::seekp (3) - std::basic_ostream<CharT,Traits>::seekp
- std::basic_ostream<CharT,Traits>::sentry (3) - std::basic_ostream<CharT,Traits>::sentry
- std::basic_ostream<CharT,Traits>::swap (3) - std::basic_ostream<CharT,Traits>::swap
- std::basic_ostream<CharT,Traits>::tellp (3) - std::basic_ostream<CharT,Traits>::tellp
- std::basic_ostream<CharT,Traits>::write (3) - std::basic_ostream<CharT,Traits>::write
- std::basic_ostream (3) - std::basic_ostream
- std::basic_ostream_sentry (3)
- std::basic_ostringstream (3) - std::basic_ostringstream
- std::basic_ostringstream::operator= (3) - std::basic_ostringstream::operator=
- std::basic_ostringstream::rdbuf (3) - std::basic_ostringstream::rdbuf
- std::basic_ostringstream::swap (3) - std::basic_ostringstream::swap
- std::basic_ostringstream<CharT,Traits,Allocator>::basic_ostringstream (3) - std::basic_ostringstream<CharT,Traits,Allocator>::basic_ostringstream
- std::basic_ostringstream<CharT,Traits,Allocator>::str (3) - std::basic_ostringstream<CharT,Traits,Allocator>::str
- std::basic_osyncstream (3) - std::basic_osyncstream