Namespaces
Variants
Actions

std::basic_ios<CharT,Traits>::set_rdbuf

From cppreference.com
< cpp‎ | io‎ | basic ios
 
C++
 
Input/output library
 
std::basic_ios
protected:
void set_rdbuf( std::basic_streambuf<CharT,Traits>* sb );
(since C++11)

Sets the associated stream buffer to sb without clearing the error state.

This member function is protected: it is called by the move constructors of the derived streams such as std::basic_ofstream or std::basic_istringstream, as the final step after constructing the base class and after moving the stream buffer: only the most derived stream class knows how to correctly move the stream buffer, but std::basic_ios needs to be made aware of the stream's new location so that its public member functions can access it.

Contents

[edit] Parameters

sb - stream buffer to associate to

[edit] Return value

(none)

[edit] Exceptions

Throws nothing.

[edit] Example

[edit] See also

manages associated stream buffer
(public member function) [edit]

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant