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_istream::~basic_istream(3) C++ Standard Libary std::basic_istream::~basic_istream(3)

std::basic_istream::~basic_istream - std::basic_istream::~basic_istream


virtual ~basic_istream();


Destructs the input stream.


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.

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


10,20

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.