GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
std::basic_ostream::~basic_ostream(3) C++ Standard Libary std::basic_ostream::~basic_ostream(3)

std::basic_ostream::~basic_ostream - std::basic_ostream::~basic_ostream


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.

// 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';
}


42 is the answer.

2022.07.31 http://cppreference.com

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.