std::basic_stringbuf<CharT,Traits,Allocator>::init_buf_ptrs

Initializes the input and output sequences from buf according to mode. buf and mode are exposition-only data members of *this.

# Declarations

void init_buf_ptrs();

(exposition only*)

# Notes

For efficiency reasons, stream buffer operations can violate invariants of buf while it is held encapsulated in the std::basic_stringbuf, e.g., by writing to characters in the range [buf.data() + buf.size(),buf.data() + buf.capacity()).

All operations retrieving a std::basic_string from buf ensure that the std::basic_string invariants hold on the returned value.

# Defect reports

DRApplied toBehavior as publishedCorrect behavior
LWG 1448C++98calling init_buf_ptrs() madepptr() == pbase() + buf.data()for streams that are both input and output streamsmakespptr() == pbase() + buf.size()for append streams