From Jason Turner

[stream.buffers]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpcrg_xmqo/{from.md → to.md} +12 -6
tmp/tmpcrg_xmqo/{from.md → to.md} RENAMED
@@ -2,10 +2,11 @@
2
 
3
  ### Header `<streambuf>` synopsis <a id="streambuf.syn">[[streambuf.syn]]</a>
4
 
5
  ``` cpp
6
  namespace std {
 
7
  template<class charT, class traits = char_traits<charT>>
8
  class basic_streambuf;
9
  using streambuf = basic_streambuf<char>;
10
  using wstreambuf = basic_streambuf<wchar_t>;
11
  }
@@ -73,13 +74,13 @@ above:
73
  namespace std {
74
  template<class charT, class traits = char_traits<charT>>
75
  class basic_streambuf {
76
  public:
77
  using char_type = charT;
78
- using int_type = typename traits::int_type;
79
- using pos_type = typename traits::pos_type;
80
- using off_type = typename traits::off_type;
81
  using traits_type = traits;
82
 
83
  virtual ~basic_streambuf();
84
 
85
  // [streambuf.locales], locales
@@ -161,13 +162,13 @@ namespace std {
161
  virtual int_type overflow(int_type c = traits::eof());
162
  };
163
  }
164
  ```
165
 
166
- The class template `basic_streambuf` serves as an abstract base class
167
- for deriving various *stream buffers* whose objects each control two
168
- *character sequences*:
169
 
170
  - a character *input sequence*;
171
  - a character *output sequence*.
172
 
173
  #### Constructors <a id="streambuf.cons">[[streambuf.cons]]</a>
@@ -390,10 +391,13 @@ void gbump(int n);
390
 
391
  ``` cpp
392
  void setg(char_type* gbeg, char_type* gnext, char_type* gend);
393
  ```
394
 
 
 
 
395
  *Ensures:* `gbeg == eback()`, `gnext == gptr()`, and `gend == egptr()`
396
  are all `true`.
397
 
398
  ##### Put area access <a id="streambuf.put.area">[[streambuf.put.area]]</a>
399
 
@@ -423,10 +427,12 @@ void pbump(int n);
423
 
424
  ``` cpp
425
  void setp(char_type* pbeg, char_type* pend);
426
  ```
427
 
 
 
428
  *Ensures:* `pbeg == pbase()`, `pbeg == pptr()`, and `pend == epptr()`
429
  are all `true`.
430
 
431
  #### Virtual functions <a id="streambuf.virtuals">[[streambuf.virtuals]]</a>
432
 
 
2
 
3
  ### Header `<streambuf>` synopsis <a id="streambuf.syn">[[streambuf.syn]]</a>
4
 
5
  ``` cpp
6
  namespace std {
7
+ // [streambuf], class template basic_streambuf
8
  template<class charT, class traits = char_traits<charT>>
9
  class basic_streambuf;
10
  using streambuf = basic_streambuf<char>;
11
  using wstreambuf = basic_streambuf<wchar_t>;
12
  }
 
74
  namespace std {
75
  template<class charT, class traits = char_traits<charT>>
76
  class basic_streambuf {
77
  public:
78
  using char_type = charT;
79
+ using int_type = traits::int_type;
80
+ using pos_type = traits::pos_type;
81
+ using off_type = traits::off_type;
82
  using traits_type = traits;
83
 
84
  virtual ~basic_streambuf();
85
 
86
  // [streambuf.locales], locales
 
162
  virtual int_type overflow(int_type c = traits::eof());
163
  };
164
  }
165
  ```
166
 
167
+ The class template `basic_streambuf` serves as a base class for deriving
168
+ various *stream buffers* whose objects each control two *character
169
+ sequences*:
170
 
171
  - a character *input sequence*;
172
  - a character *output sequence*.
173
 
174
  #### Constructors <a id="streambuf.cons">[[streambuf.cons]]</a>
 
391
 
392
  ``` cpp
393
  void setg(char_type* gbeg, char_type* gnext, char_type* gend);
394
  ```
395
 
396
+ *Preconditions:* \[`gbeg`, `gnext`), \[`gbeg`, `gend`), and \[`gnext`,
397
+ `gend`) are all valid ranges.
398
+
399
  *Ensures:* `gbeg == eback()`, `gnext == gptr()`, and `gend == egptr()`
400
  are all `true`.
401
 
402
  ##### Put area access <a id="streambuf.put.area">[[streambuf.put.area]]</a>
403
 
 
427
 
428
  ``` cpp
429
  void setp(char_type* pbeg, char_type* pend);
430
  ```
431
 
432
+ *Preconditions:* \[`pbeg`, `pend`) is a valid range.
433
+
434
  *Ensures:* `pbeg == pbase()`, `pbeg == pptr()`, and `pend == epptr()`
435
  are all `true`.
436
 
437
  #### Virtual functions <a id="streambuf.virtuals">[[streambuf.virtuals]]</a>
438