protected virtual member function
<streambuf> <iostream>
streambuf* setbuf (char* s, streamsize n);
Set buffer
Virtual function called by the public member function pubsetbuf to influence the object in a specific way for each derived class.
Its default behavior in streambuf is to do nothing and return this
, but derived classes can override this behavior to perform specific actions: both filebuf and stringbuf override this virtual member function (see filebuf::setbuf and stringbuf::setbuf).
Parameters
- s, n
- Arguments that may be used by overriding functions in derived classes.
streamsize is a signed integral type.
Return Value
Returns this.
Data races
Introduces no data races, but overriden versions in derived classes may.
Exception safety
No-throw guarantee: this default definition never throws exceptions.