tmp/tmpoax7_x66/{from.md → to.md}
RENAMED
|
@@ -2,20 +2,21 @@
|
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
namespace std {
|
| 5 |
class strstreambuf : public basic_streambuf<char> {
|
| 6 |
public:
|
| 7 |
-
|
|
|
|
| 8 |
strstreambuf(void* (*palloc_arg)(size_t), void (*pfree_arg)(void*));
|
| 9 |
-
strstreambuf(char* gnext_arg, streamsize n, char* pbeg_arg =
|
| 10 |
strstreambuf(const char* gnext_arg, streamsize n);
|
| 11 |
|
| 12 |
strstreambuf(signed char* gnext_arg, streamsize n,
|
| 13 |
-
signed char* pbeg_arg =
|
| 14 |
strstreambuf(const signed char* gnext_arg, streamsize n);
|
| 15 |
strstreambuf(unsigned char* gnext_arg, streamsize n,
|
| 16 |
-
unsigned char* pbeg_arg =
|
| 17 |
strstreambuf(const unsigned char* gnext_arg, streamsize n);
|
| 18 |
|
| 19 |
virtual ~strstreambuf();
|
| 20 |
|
| 21 |
void freeze(bool freezefl = true);
|
|
@@ -25,15 +26,13 @@ namespace std {
|
|
| 25 |
protected:
|
| 26 |
int_type overflow (int_type c = EOF) override;
|
| 27 |
int_type pbackfail(int_type c = EOF) override;
|
| 28 |
int_type underflow() override;
|
| 29 |
pos_type seekoff(off_type off, ios_base::seekdir way,
|
| 30 |
-
ios_base::openmode which
|
| 31 |
-
= ios_base::in | ios_base::out) override;
|
| 32 |
pos_type seekpos(pos_type sp,
|
| 33 |
-
ios_base::openmode which
|
| 34 |
-
= ios_base::in | ios_base::out) override;
|
| 35 |
streambuf* setbuf(char* s, streamsize n) override;
|
| 36 |
|
| 37 |
private:
|
| 38 |
using strstate = T1; // exposition only
|
| 39 |
static const strstate allocated; // exposition only
|
|
@@ -90,18 +89,18 @@ seekable area is undefined. Otherwise, `seeklow` equals `gbeg` and
|
|
| 90 |
`seekhigh` is either `pend`, if `pend` is not a null pointer, or `gend`.
|
| 91 |
|
| 92 |
#### `strstreambuf` constructors <a id="depr.strstreambuf.cons">[[depr.strstreambuf.cons]]</a>
|
| 93 |
|
| 94 |
``` cpp
|
| 95 |
-
explicit strstreambuf(streamsize alsize_arg
|
| 96 |
```
|
| 97 |
|
| 98 |
-
*Effects:*
|
| 99 |
-
|
| 100 |
-
|
| 101 |
|
| 102 |
-
**Table: `strstreambuf(streamsize)` effects** <a id="
|
| 103 |
|
| 104 |
| Element | Value |
|
| 105 |
| --------- | -------------- |
|
| 106 |
| `strmode` | `dynamic` |
|
| 107 |
| `alsize` | `alsize_arg` |
|
|
@@ -110,36 +109,36 @@ are indicated in Table [[tab:future.strstreambuf.effects]].
|
|
| 110 |
|
| 111 |
``` cpp
|
| 112 |
strstreambuf(void* (*palloc_arg)(size_t), void (*pfree_arg)(void*));
|
| 113 |
```
|
| 114 |
|
| 115 |
-
*Effects:*
|
| 116 |
-
|
| 117 |
-
|
| 118 |
|
| 119 |
-
**Table: `strstreambuf(void* (*)(size_t), void (*)(void*))` effects** <a id="
|
| 120 |
|
| 121 |
| Element | Value |
|
| 122 |
| --------- | -------------------- |
|
| 123 |
| `strmode` | `dynamic` |
|
| 124 |
| `alsize` | an unspecified value |
|
| 125 |
| `palloc` | `palloc_arg` |
|
| 126 |
| `pfree` | `pfree_arg` |
|
| 127 |
|
| 128 |
``` cpp
|
| 129 |
-
strstreambuf(char* gnext_arg, streamsize n, char* pbeg_arg =
|
| 130 |
strstreambuf(signed char* gnext_arg, streamsize n,
|
| 131 |
-
signed char* pbeg_arg =
|
| 132 |
strstreambuf(unsigned char* gnext_arg, streamsize n,
|
| 133 |
-
unsigned char* pbeg_arg =
|
| 134 |
```
|
| 135 |
|
| 136 |
-
*Effects:*
|
| 137 |
-
|
| 138 |
-
|
| 139 |
|
| 140 |
-
**Table: `strstreambuf(charT*, streamsize, charT*)` effects** <a id="
|
| 141 |
|
| 142 |
| Element | Value |
|
| 143 |
| --------- | -------------------- |
|
| 144 |
| `strmode` | 0 |
|
| 145 |
| `alsize` | an unspecified value |
|
|
@@ -302,27 +301,27 @@ as a result of any call.
|
|
| 302 |
pos_type seekoff(off_type off, seekdir way, openmode which = in | out) override;
|
| 303 |
```
|
| 304 |
|
| 305 |
*Effects:* Alters the stream position within one of the controlled
|
| 306 |
sequences, if possible, as indicated in
|
| 307 |
-
|
| 308 |
|
| 309 |
-
**Table: `seekoff` positioning** <a id="
|
| 310 |
|
| 311 |
| Conditions | Result |
|
| 312 |
-
| --------------------------------------------------------------------------------------------------------------------
|
| 313 |
| `(which & ios::in) != 0` | positions the input sequence |
|
| 314 |
| `(which & ios::out) != 0` | positions the output sequence |
|
| 315 |
-
| `(which & (ios::in |
|
| 316 |
| Otherwise | the positioning operation fails. |
|
| 317 |
|
| 318 |
|
| 319 |
For a sequence to be positioned, if its next pointer is a null pointer,
|
| 320 |
the positioning operation fails. Otherwise, the function determines
|
| 321 |
-
`newoff` as indicated in
|
| 322 |
|
| 323 |
-
**Table: `newoff` values** <a id="
|
| 324 |
|
| 325 |
| Condition | `newoff` Value |
|
| 326 |
| ----------------- | -------------------------------------------------------------- |
|
| 327 |
| `way == ios::beg` | 0 |
|
| 328 |
| `way == ios::cur` | the next pointer minus the beginning pointer (`xnext - xbeg`). |
|
|
@@ -339,12 +338,11 @@ pointer `xnext`.
|
|
| 339 |
position, if possible. If the positioning operation fails, or if the
|
| 340 |
constructed object cannot represent the resultant stream position, the
|
| 341 |
return value is `pos_type(off_type(-1))`.
|
| 342 |
|
| 343 |
``` cpp
|
| 344 |
-
pos_type seekpos(pos_type sp, ios_base::openmode which
|
| 345 |
-
= ios_base::in | ios_base::out) override;
|
| 346 |
```
|
| 347 |
|
| 348 |
*Effects:* Alters the stream position within one of the controlled
|
| 349 |
sequences, if possible, to correspond to the stream position stored in
|
| 350 |
`sp` (as described below).
|
|
@@ -372,8 +370,8 @@ return value is `pos_type(off_type(-1))`.
|
|
| 372 |
|
| 373 |
``` cpp
|
| 374 |
streambuf<char>* setbuf(char* s, streamsize n) override;
|
| 375 |
```
|
| 376 |
|
| 377 |
-
*Effects:*
|
| 378 |
-
effect.
|
| 379 |
|
|
|
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
namespace std {
|
| 5 |
class strstreambuf : public basic_streambuf<char> {
|
| 6 |
public:
|
| 7 |
+
strstreambuf() : strstreambuf(0) {}
|
| 8 |
+
explicit strstreambuf(streamsize alsize_arg);
|
| 9 |
strstreambuf(void* (*palloc_arg)(size_t), void (*pfree_arg)(void*));
|
| 10 |
+
strstreambuf(char* gnext_arg, streamsize n, char* pbeg_arg = nullptr);
|
| 11 |
strstreambuf(const char* gnext_arg, streamsize n);
|
| 12 |
|
| 13 |
strstreambuf(signed char* gnext_arg, streamsize n,
|
| 14 |
+
signed char* pbeg_arg = nullptr);
|
| 15 |
strstreambuf(const signed char* gnext_arg, streamsize n);
|
| 16 |
strstreambuf(unsigned char* gnext_arg, streamsize n,
|
| 17 |
+
unsigned char* pbeg_arg = nullptr);
|
| 18 |
strstreambuf(const unsigned char* gnext_arg, streamsize n);
|
| 19 |
|
| 20 |
virtual ~strstreambuf();
|
| 21 |
|
| 22 |
void freeze(bool freezefl = true);
|
|
|
|
| 26 |
protected:
|
| 27 |
int_type overflow (int_type c = EOF) override;
|
| 28 |
int_type pbackfail(int_type c = EOF) override;
|
| 29 |
int_type underflow() override;
|
| 30 |
pos_type seekoff(off_type off, ios_base::seekdir way,
|
| 31 |
+
ios_base::openmode which = ios_base::in | ios_base::out) override;
|
|
|
|
| 32 |
pos_type seekpos(pos_type sp,
|
| 33 |
+
ios_base::openmode which = ios_base::in | ios_base::out) override;
|
|
|
|
| 34 |
streambuf* setbuf(char* s, streamsize n) override;
|
| 35 |
|
| 36 |
private:
|
| 37 |
using strstate = T1; // exposition only
|
| 38 |
static const strstate allocated; // exposition only
|
|
|
|
| 89 |
`seekhigh` is either `pend`, if `pend` is not a null pointer, or `gend`.
|
| 90 |
|
| 91 |
#### `strstreambuf` constructors <a id="depr.strstreambuf.cons">[[depr.strstreambuf.cons]]</a>
|
| 92 |
|
| 93 |
``` cpp
|
| 94 |
+
explicit strstreambuf(streamsize alsize_arg);
|
| 95 |
```
|
| 96 |
|
| 97 |
+
*Effects:* Initializes the base class with `streambuf()`. The
|
| 98 |
+
postconditions of this function are indicated in
|
| 99 |
+
[[depr.strstreambuf.cons.sz]].
|
| 100 |
|
| 101 |
+
**Table: `strstreambuf(streamsize)` effects** <a id="depr.strstreambuf.cons.sz">[depr.strstreambuf.cons.sz]</a>
|
| 102 |
|
| 103 |
| Element | Value |
|
| 104 |
| --------- | -------------- |
|
| 105 |
| `strmode` | `dynamic` |
|
| 106 |
| `alsize` | `alsize_arg` |
|
|
|
|
| 109 |
|
| 110 |
``` cpp
|
| 111 |
strstreambuf(void* (*palloc_arg)(size_t), void (*pfree_arg)(void*));
|
| 112 |
```
|
| 113 |
|
| 114 |
+
*Effects:* Initializes the base class with `streambuf()`. The
|
| 115 |
+
postconditions of this function are indicated in
|
| 116 |
+
[[depr.strstreambuf.cons.alloc]].
|
| 117 |
|
| 118 |
+
**Table: `strstreambuf(void* (*)(size_t), void (*)(void*))` effects** <a id="depr.strstreambuf.cons.alloc">[depr.strstreambuf.cons.alloc]</a>
|
| 119 |
|
| 120 |
| Element | Value |
|
| 121 |
| --------- | -------------------- |
|
| 122 |
| `strmode` | `dynamic` |
|
| 123 |
| `alsize` | an unspecified value |
|
| 124 |
| `palloc` | `palloc_arg` |
|
| 125 |
| `pfree` | `pfree_arg` |
|
| 126 |
|
| 127 |
``` cpp
|
| 128 |
+
strstreambuf(char* gnext_arg, streamsize n, char* pbeg_arg = nullptr);
|
| 129 |
strstreambuf(signed char* gnext_arg, streamsize n,
|
| 130 |
+
signed char* pbeg_arg = nullptr);
|
| 131 |
strstreambuf(unsigned char* gnext_arg, streamsize n,
|
| 132 |
+
unsigned char* pbeg_arg = nullptr);
|
| 133 |
```
|
| 134 |
|
| 135 |
+
*Effects:* Initializes the base class with `streambuf()`. The
|
| 136 |
+
postconditions of this function are indicated in
|
| 137 |
+
[[depr.strstreambuf.cons.ptr]].
|
| 138 |
|
| 139 |
+
**Table: `strstreambuf(charT*, streamsize, charT*)` effects** <a id="depr.strstreambuf.cons.ptr">[depr.strstreambuf.cons.ptr]</a>
|
| 140 |
|
| 141 |
| Element | Value |
|
| 142 |
| --------- | -------------------- |
|
| 143 |
| `strmode` | 0 |
|
| 144 |
| `alsize` | an unspecified value |
|
|
|
|
| 301 |
pos_type seekoff(off_type off, seekdir way, openmode which = in | out) override;
|
| 302 |
```
|
| 303 |
|
| 304 |
*Effects:* Alters the stream position within one of the controlled
|
| 305 |
sequences, if possible, as indicated in
|
| 306 |
+
[[depr.strstreambuf.seekoff.pos]].
|
| 307 |
|
| 308 |
+
**Table: `seekoff` positioning** <a id="depr.strstreambuf.seekoff.pos">[depr.strstreambuf.seekoff.pos]</a>
|
| 309 |
|
| 310 |
| Conditions | Result |
|
| 311 |
+
| -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- |
|
| 312 |
| `(which & ios::in) != 0` | positions the input sequence |
|
| 313 |
| `(which & ios::out) != 0` | positions the output sequence |
|
| 314 |
+
| `(which & (ios::in | ios::out)) ==`<br> `(ios::in | ios::out)` and either<br> `way == ios::beg` or `way == ios::end` | positions both the input and the output sequences |
|
| 315 |
| Otherwise | the positioning operation fails. |
|
| 316 |
|
| 317 |
|
| 318 |
For a sequence to be positioned, if its next pointer is a null pointer,
|
| 319 |
the positioning operation fails. Otherwise, the function determines
|
| 320 |
+
`newoff` as indicated in [[depr.strstreambuf.seekoff.newoff]].
|
| 321 |
|
| 322 |
+
**Table: `newoff` values** <a id="depr.strstreambuf.seekoff.newoff">[depr.strstreambuf.seekoff.newoff]</a>
|
| 323 |
|
| 324 |
| Condition | `newoff` Value |
|
| 325 |
| ----------------- | -------------------------------------------------------------- |
|
| 326 |
| `way == ios::beg` | 0 |
|
| 327 |
| `way == ios::cur` | the next pointer minus the beginning pointer (`xnext - xbeg`). |
|
|
|
|
| 338 |
position, if possible. If the positioning operation fails, or if the
|
| 339 |
constructed object cannot represent the resultant stream position, the
|
| 340 |
return value is `pos_type(off_type(-1))`.
|
| 341 |
|
| 342 |
``` cpp
|
| 343 |
+
pos_type seekpos(pos_type sp, ios_base::openmode which = ios_base::in | ios_base::out) override;
|
|
|
|
| 344 |
```
|
| 345 |
|
| 346 |
*Effects:* Alters the stream position within one of the controlled
|
| 347 |
sequences, if possible, to correspond to the stream position stored in
|
| 348 |
`sp` (as described below).
|
|
|
|
| 370 |
|
| 371 |
``` cpp
|
| 372 |
streambuf<char>* setbuf(char* s, streamsize n) override;
|
| 373 |
```
|
| 374 |
|
| 375 |
+
*Effects:* Behavior is *implementation-defined*, except that
|
| 376 |
+
`setbuf(0, 0)` has no effect.
|
| 377 |
|