protected member function
<ios> <iostream>

std::basic_ios::set_rdbuf

void set_rdbuf (basic_streambuf<char_type,traits_type>* sb);
Set stream buffer
Sets sb as the stream buffer associated with the stream, without altering the control state flag (rdstate).

sb shall not be a null pointer.

Derived classes can call this function to change the stream buffer.

Parameters

sb
Pointer to a basic_streambuf object with the same template parameters as the basic_ios object.
This shall not be a null pointer.
char_type and traits_type are member types defined as aliases of the first and second class template parameters, respectively (see basic_ios types).

Return Value

none

Data races

Modifies the stream object.
Concurrent access to the same stream object may cause data races.

Exception safety

Basic guarantee: if an exception is thrown, the stream is in a valid state.

See also