From Jason Turner

[streambuf.virtuals]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp4q7zr0jo/{from.md → to.md} +30 -2
tmp/tmp4q7zr0jo/{from.md → to.md} RENAMED
@@ -1,11 +1,11 @@
1
  #### `basic_streambuf` virtual functions <a id="streambuf.virtuals">[[streambuf.virtuals]]</a>
2
 
3
  ##### Locales <a id="streambuf.virt.locales">[[streambuf.virt.locales]]</a>
4
 
5
  ``` cpp
6
- void imbue(const locale&)
7
  ```
8
 
9
  *Effects:* Change any translations based on locale.
10
 
11
  *Remarks:* Allows the derived class to be informed of changes in locale
@@ -157,11 +157,11 @@ The *pending sequence* is defined as for `underflow()`, with the
157
  modifications that
158
 
159
  - If `traits::eq_int_type(c,traits::eof())` returns `true`, then the
160
  input sequence is backed up one character before the pending sequence
161
  is determined.
162
- - If `traits::eq_int_type(c,traits::eof())` return false, then `c` is
163
  prepended. Whether the input sequence is backed up or modified in any
164
  other way is unspecified.
165
 
166
  On return, the constraints of `gptr()`, `eback()`, and `pptr()` are the
167
  same as for `underflow()`.
@@ -179,9 +179,37 @@ Returns some value other than `traits::eof()` to indicate success.
179
 
180
  ``` cpp
181
  streamsize xsputn(const char_type* s, streamsize n);
182
  ```
183
 
 
 
 
 
 
 
 
 
 
 
184
  ``` cpp
185
  int_type overflow(int_type c = traits::eof());
186
  ```
187
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  #### `basic_streambuf` virtual functions <a id="streambuf.virtuals">[[streambuf.virtuals]]</a>
2
 
3
  ##### Locales <a id="streambuf.virt.locales">[[streambuf.virt.locales]]</a>
4
 
5
  ``` cpp
6
+ void imbue(const locale&);
7
  ```
8
 
9
  *Effects:* Change any translations based on locale.
10
 
11
  *Remarks:* Allows the derived class to be informed of changes in locale
 
157
  modifications that
158
 
159
  - If `traits::eq_int_type(c,traits::eof())` returns `true`, then the
160
  input sequence is backed up one character before the pending sequence
161
  is determined.
162
+ - If `traits::eq_int_type(c,traits::eof())` returns `false`, then `c` is
163
  prepended. Whether the input sequence is backed up or modified in any
164
  other way is unspecified.
165
 
166
  On return, the constraints of `gptr()`, `eback()`, and `pptr()` are the
167
  same as for `underflow()`.
 
179
 
180
  ``` cpp
181
  streamsize xsputn(const char_type* s, streamsize n);
182
  ```
183
 
184
+ *Effects:* Writes up to `n` characters to the output sequence as if by
185
+ repeated calls to `sputc(c)`. The characters written are obtained from
186
+ successive elements of the array whose first element is designated by
187
+ `s`. Writing stops when either `n` characters have been written or a
188
+ call to `sputc(c)` would return `traits::eof()`. Is is unspecified
189
+ whether the function calls `overflow()` when `pptr() == epptr()` becomes
190
+ true or whether it achieves the same effects by other means.
191
+
192
+ *Returns:* The number of characters written.
193
+
194
  ``` cpp
195
  int_type overflow(int_type c = traits::eof());
196
  ```
197
 
198
+ *Effects:* Consumes some initial subsequence of the characters of the
199
+ *pending sequence*. The pending sequence is defined as the concatenation
200
+ of
201
+
202
+ *Remarks:* The member functions `sputc()` and `sputn()` call this
203
+ function in case that no room can be found in the put buffer enough to
204
+ accommodate the argument character sequence.
205
+
206
+ *Requires:* Every overriding definition of this virtual function shall
207
+ obey the following constraints:
208
+
209
+ *Returns:* `traits::eof()` or throws an exception if the function fails.
210
+
211
+ Otherwise, returns some value other than `traits::eof()` to indicate
212
+ success.[^16]
213
+
214
+ *Default behavior:* Returns `traits::eof()`.
215
+