protected member function
<streambuf> <iostream>

std::streambuf::setp

void setp (char* new_pbase, char* new_epptr);
Set output sequence pointers
Sets the value for the pointers that define the boundaries of the buffered portion of the controlled output sequence (pbase and epptr).

The put pointer (pptr) is automatically set to the beginning of this sequence.

This is a protected member that other member functions can call to change the array that describes the buffered portion of the controlled output sequence.

Parameters

new_pbase
New value for the pointer to the beginning of the accessible part of the controlled output sequence (pbase).
The put pointer (pptr) is also set to this value.
new_epptr
New value for the end pointer, just past the end of the accessible part of the controlled output sequence (epptr).
This shall point to a character in the same array as new_pbase.

Return Value

none

Data races

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

Exception safety

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

Invalid arguments cause undefined behavior.

See also