From Jason Turner

[filebuf.virtuals]

Diff to HTML by rtfpessoa

tmp/tmpzd_ua87w/{from.md → to.md} RENAMED
@@ -21,11 +21,11 @@ that a sequence of characters is read from the input sequence as if by
21
  reading from the associated file into an internal buffer (`extern_buf`)
22
  and then as if by doing:
23
 
24
  ``` cpp
25
  char extern_buf[XSIZE];
26
- char* extern_end;
27
  charT intern_buf[ISIZE];
28
  charT* intern_end;
29
  codecvt_base::result r =
30
  a_codecvt.in(state, extern_buf, extern_buf+XSIZE, extern_end,
31
  intern_buf, intern_buf+ISIZE, intern_end);
@@ -86,11 +86,11 @@ int_type overflow(int_type c = traits::eof()) override;
86
  of “consuming characters” is performed by first converting as if by:
87
 
88
  ``` cpp
89
  charT* b = pbase();
90
  charT* p = pptr();
91
- charT* end;
92
  char xbuf[XSIZE];
93
  char* xbuf_end;
94
  codecvt_base::result r =
95
  a_codecvt.out(state, b, p, end, xbuf, xbuf+XSIZE, xbuf_end);
96
  ```
@@ -105,10 +105,12 @@ and then
105
  to `p`. If output fails, fail (without repeating).
106
  - Otherwise output from `xbuf` to `xbuf_end`, and fail if output fails.
107
  At this point if `b != p` and `b == end` (`xbuf` isn’t large enough)
108
  then increase `XSIZE` and repeat from the beginning.
109
 
 
 
110
  *Returns:* `traits::not_eof(c)` to indicate success, and `traits::eof()`
111
  to indicate failure. If `is_open() == false`, the function always fails.
112
 
113
  ``` cpp
114
  basic_streambuf* setbuf(char_type* s, streamsize n) override;
@@ -139,11 +141,11 @@ resultant stream position, if possible. If the positioning operation
139
  fails, or if the object cannot represent the resultant stream position,
140
  returns `pos_type(off_type(-1))`.
141
 
142
  *Remarks:* “The last operation was output” means either the last virtual
143
  operation was overflow or the put buffer is non-empty. “Write any
144
- unshift sequence” means, if `width` if less than zero then call
145
  `a_codecvt.unshift(state, xbuf, xbuf+XSIZE, xbuf_end)` and output the
146
  resulting unshift sequence. The function determines one of three values
147
  for the argument `whence`, of type `int`, as indicated in
148
  [[filebuf.seekoff]].
149
 
 
21
  reading from the associated file into an internal buffer (`extern_buf`)
22
  and then as if by doing:
23
 
24
  ``` cpp
25
  char extern_buf[XSIZE];
26
+ const char* extern_end;
27
  charT intern_buf[ISIZE];
28
  charT* intern_end;
29
  codecvt_base::result r =
30
  a_codecvt.in(state, extern_buf, extern_buf+XSIZE, extern_end,
31
  intern_buf, intern_buf+ISIZE, intern_end);
 
86
  of “consuming characters” is performed by first converting as if by:
87
 
88
  ``` cpp
89
  charT* b = pbase();
90
  charT* p = pptr();
91
+ const charT* end;
92
  char xbuf[XSIZE];
93
  char* xbuf_end;
94
  codecvt_base::result r =
95
  a_codecvt.out(state, b, p, end, xbuf, xbuf+XSIZE, xbuf_end);
96
  ```
 
105
  to `p`. If output fails, fail (without repeating).
106
  - Otherwise output from `xbuf` to `xbuf_end`, and fail if output fails.
107
  At this point if `b != p` and `b == end` (`xbuf` isn’t large enough)
108
  then increase `XSIZE` and repeat from the beginning.
109
 
110
+ Then establishes an observable checkpoint [[intro.abstract]].
111
+
112
  *Returns:* `traits::not_eof(c)` to indicate success, and `traits::eof()`
113
  to indicate failure. If `is_open() == false`, the function always fails.
114
 
115
  ``` cpp
116
  basic_streambuf* setbuf(char_type* s, streamsize n) override;
 
141
  fails, or if the object cannot represent the resultant stream position,
142
  returns `pos_type(off_type(-1))`.
143
 
144
  *Remarks:* “The last operation was output” means either the last virtual
145
  operation was overflow or the put buffer is non-empty. “Write any
146
+ unshift sequence” means, if `width` is less than zero then call
147
  `a_codecvt.unshift(state, xbuf, xbuf+XSIZE, xbuf_end)` and output the
148
  resulting unshift sequence. The function determines one of three values
149
  for the argument `whence`, of type `int`, as indicated in
150
  [[filebuf.seekoff]].
151