| I/O manipulators | ||||
| Print functions(C++23) | ||||
| C-style I/O | ||||
| Buffers | ||||
(C++23) | ||||
(C++98/26*) | ||||
(C++20) | ||||
| Streams | ||||
| Abstractions | ||||
| File I/O | ||||
| String I/O | ||||
| Array I/O | ||||
(C++23) | ||||
(C++23) | ||||
(C++23) | ||||
(C++98/26*) | ||||
(C++98/26*) | ||||
(C++98/26*) | ||||
| Synchronized Output | ||||
(C++20) | ||||
| Types | ||||
| Error category interface | ||||
(C++11) | ||||
(C++11) |
| Public member functions | ||||
(C++11) | ||||
(C++11) | ||||
(C++20) | ||||
| Protected member functions | ||||
| Non-member functions | ||||
(C++11) | ||||
| Exposition-only member functions | ||||
basic_stringbuf::init_buf_ptrs |
void init_buf_ptrs(); | (exposition only*) | |
Initializes the input and output sequences frombuf according tomode.buf andmode areexposition-only data members of*this.
Immediately after this function returns:
For efficiency reasons, stream buffer operations can violate invariants ofbuf while it is held encapsulated in thestd::basic_stringbuf, e.g., by writing to characters in the range[buf.data()+ buf.size(), buf.data()+ buf.capacity()).
All operations retrieving astd::basic_string frombuf ensure that thestd::basic_string invariants hold on the returned value.
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
| DR | Applied to | Behavior as published | Correct behavior |
|---|---|---|---|
| LWG 1448 | C++98 | callinginit_buf_ptrs() madepptr()== pbase()+ buf.data() for streams that are both input and output streams | makes pptr()== pbase()+ buf.size() for append streams |