tmp/tmpoj6l0emg/{from.md → to.md}
RENAMED
|
@@ -6,13 +6,13 @@
|
|
| 6 |
namespace std {
|
| 7 |
template<class charT, class traits = char_traits<charT>>
|
| 8 |
class basic_streambuf {
|
| 9 |
public:
|
| 10 |
using char_type = charT;
|
| 11 |
-
using int_type =
|
| 12 |
-
using pos_type =
|
| 13 |
-
using off_type =
|
| 14 |
using traits_type = traits;
|
| 15 |
|
| 16 |
virtual ~basic_streambuf();
|
| 17 |
|
| 18 |
// [streambuf.locales], locales
|
|
@@ -94,13 +94,13 @@ namespace std {
|
|
| 94 |
virtual int_type overflow(int_type c = traits::eof());
|
| 95 |
};
|
| 96 |
}
|
| 97 |
```
|
| 98 |
|
| 99 |
-
The class template `basic_streambuf` serves as
|
| 100 |
-
|
| 101 |
-
|
| 102 |
|
| 103 |
- a character *input sequence*;
|
| 104 |
- a character *output sequence*.
|
| 105 |
|
| 106 |
#### Constructors <a id="streambuf.cons">[[streambuf.cons]]</a>
|
|
@@ -323,10 +323,13 @@ void gbump(int n);
|
|
| 323 |
|
| 324 |
``` cpp
|
| 325 |
void setg(char_type* gbeg, char_type* gnext, char_type* gend);
|
| 326 |
```
|
| 327 |
|
|
|
|
|
|
|
|
|
|
| 328 |
*Ensures:* `gbeg == eback()`, `gnext == gptr()`, and `gend == egptr()`
|
| 329 |
are all `true`.
|
| 330 |
|
| 331 |
##### Put area access <a id="streambuf.put.area">[[streambuf.put.area]]</a>
|
| 332 |
|
|
@@ -356,10 +359,12 @@ void pbump(int n);
|
|
| 356 |
|
| 357 |
``` cpp
|
| 358 |
void setp(char_type* pbeg, char_type* pend);
|
| 359 |
```
|
| 360 |
|
|
|
|
|
|
|
| 361 |
*Ensures:* `pbeg == pbase()`, `pbeg == pptr()`, and `pend == epptr()`
|
| 362 |
are all `true`.
|
| 363 |
|
| 364 |
#### Virtual functions <a id="streambuf.virtuals">[[streambuf.virtuals]]</a>
|
| 365 |
|
|
|
|
| 6 |
namespace std {
|
| 7 |
template<class charT, class traits = char_traits<charT>>
|
| 8 |
class basic_streambuf {
|
| 9 |
public:
|
| 10 |
using char_type = charT;
|
| 11 |
+
using int_type = traits::int_type;
|
| 12 |
+
using pos_type = traits::pos_type;
|
| 13 |
+
using off_type = traits::off_type;
|
| 14 |
using traits_type = traits;
|
| 15 |
|
| 16 |
virtual ~basic_streambuf();
|
| 17 |
|
| 18 |
// [streambuf.locales], locales
|
|
|
|
| 94 |
virtual int_type overflow(int_type c = traits::eof());
|
| 95 |
};
|
| 96 |
}
|
| 97 |
```
|
| 98 |
|
| 99 |
+
The class template `basic_streambuf` serves as a base class for deriving
|
| 100 |
+
various *stream buffers* whose objects each control two *character
|
| 101 |
+
sequences*:
|
| 102 |
|
| 103 |
- a character *input sequence*;
|
| 104 |
- a character *output sequence*.
|
| 105 |
|
| 106 |
#### Constructors <a id="streambuf.cons">[[streambuf.cons]]</a>
|
|
|
|
| 323 |
|
| 324 |
``` cpp
|
| 325 |
void setg(char_type* gbeg, char_type* gnext, char_type* gend);
|
| 326 |
```
|
| 327 |
|
| 328 |
+
*Preconditions:* \[`gbeg`, `gnext`), \[`gbeg`, `gend`), and \[`gnext`,
|
| 329 |
+
`gend`) are all valid ranges.
|
| 330 |
+
|
| 331 |
*Ensures:* `gbeg == eback()`, `gnext == gptr()`, and `gend == egptr()`
|
| 332 |
are all `true`.
|
| 333 |
|
| 334 |
##### Put area access <a id="streambuf.put.area">[[streambuf.put.area]]</a>
|
| 335 |
|
|
|
|
| 359 |
|
| 360 |
``` cpp
|
| 361 |
void setp(char_type* pbeg, char_type* pend);
|
| 362 |
```
|
| 363 |
|
| 364 |
+
*Preconditions:* \[`pbeg`, `pend`) is a valid range.
|
| 365 |
+
|
| 366 |
*Ensures:* `pbeg == pbase()`, `pbeg == pptr()`, and `pend == epptr()`
|
| 367 |
are all `true`.
|
| 368 |
|
| 369 |
#### Virtual functions <a id="streambuf.virtuals">[[streambuf.virtuals]]</a>
|
| 370 |
|