tmp/tmpsa6mv__a/{from.md → to.md}
RENAMED
|
@@ -56,13 +56,13 @@ namespace std {
|
|
| 56 |
enum class io_errc {
|
| 57 |
stream = 1
|
| 58 |
};
|
| 59 |
|
| 60 |
template <> struct is_error_code_enum<io_errc> : public true_type { };
|
| 61 |
-
error_code make_error_code(io_errc e);
|
| 62 |
-
error_condition make_error_condition(io_errc e);
|
| 63 |
-
const error_category& iostream_category();
|
| 64 |
}
|
| 65 |
```
|
| 66 |
|
| 67 |
### Types <a id="stream.types">[[stream.types]]</a>
|
| 68 |
|
|
@@ -127,13 +127,13 @@ namespace std {
|
|
| 127 |
static constexpr openmode out = unspecified;
|
| 128 |
static constexpr openmode trunc = unspecified;
|
| 129 |
|
| 130 |
// [ios::seekdir] seekdir
|
| 131 |
typedef T4 seekdir;
|
| 132 |
-
static constexpr
|
| 133 |
-
static constexpr
|
| 134 |
-
static constexpr
|
| 135 |
|
| 136 |
class Init;
|
| 137 |
|
| 138 |
// [fmtflags.state] fmtflags state:
|
| 139 |
fmtflags flags() const;
|
|
@@ -171,13 +171,13 @@ namespace std {
|
|
| 171 |
|
| 172 |
protected:
|
| 173 |
ios_base();
|
| 174 |
|
| 175 |
private:
|
| 176 |
-
static int index; // exposition
|
| 177 |
-
long* iarray; // exposition
|
| 178 |
-
void** parray; // exposition
|
| 179 |
};
|
| 180 |
}
|
| 181 |
```
|
| 182 |
|
| 183 |
`ios_base`
|
|
@@ -233,11 +233,11 @@ number reported by the operating system. Errors arising from within the
|
|
| 233 |
stream library would typically be reported as
|
| 234 |
`error_code(io_errc::stream,
|
| 235 |
iostream_category())`.
|
| 236 |
|
| 237 |
``` cpp
|
| 238 |
-
explicit failure(const string& msg,
|
| 239 |
```
|
| 240 |
|
| 241 |
*Effects:* Constructs an object of class `failure` by constructing the
|
| 242 |
base class with `msg` and `ec`.
|
| 243 |
|
|
@@ -360,11 +360,11 @@ namespace std {
|
|
| 360 |
class ios_base::Init {
|
| 361 |
public:
|
| 362 |
Init();
|
| 363 |
~Init();
|
| 364 |
private:
|
| 365 |
-
static int init_cnt; // exposition
|
| 366 |
};
|
| 367 |
}
|
| 368 |
```
|
| 369 |
|
| 370 |
The class `Init` describes an object whose construction ensures the
|
|
@@ -525,11 +525,11 @@ c = fgetc(f);
|
|
| 525 |
```
|
| 526 |
|
| 527 |
is the same as the effect of
|
| 528 |
|
| 529 |
``` cpp
|
| 530 |
-
c = str.rdbuf()->sbumpc(
|
| 531 |
```
|
| 532 |
|
| 533 |
for any sequences of characters; and the effect of pushing back a
|
| 534 |
character `c` by
|
| 535 |
|
|
@@ -551,10 +551,13 @@ for any sequence of characters.[^6]
|
|
| 551 |
static int xalloc();
|
| 552 |
```
|
| 553 |
|
| 554 |
*Returns:* `index` `++`.
|
| 555 |
|
|
|
|
|
|
|
|
|
|
| 556 |
``` cpp
|
| 557 |
long& iword(int idx);
|
| 558 |
```
|
| 559 |
|
| 560 |
*Effects:* If `iarray` is a null pointer, allocates an array of `long`
|
|
@@ -624,11 +627,11 @@ ios_base();
|
|
| 624 |
construction. The object’s members shall be initialized by calling
|
| 625 |
`basic_ios::init` before the object’s first use or before it is
|
| 626 |
destroyed, whichever comes first; otherwise the behavior is undefined.
|
| 627 |
|
| 628 |
``` cpp
|
| 629 |
-
~ios_base()
|
| 630 |
```
|
| 631 |
|
| 632 |
*Effects:* Destroys an object of class `ios_base`. Calls each registered
|
| 633 |
callback pair `(fn, index)` ([[ios.base.callback]]) as
|
| 634 |
`(*fn)(erase_event, *this, index)` at such time that any `ios_base`
|
|
@@ -642,11 +645,11 @@ namespace std {
|
|
| 642 |
public:
|
| 643 |
// [fpos.members] Members
|
| 644 |
stateT state() const;
|
| 645 |
void state(stateT);
|
| 646 |
private;
|
| 647 |
-
stateT st; // exposition
|
| 648 |
};
|
| 649 |
}
|
| 650 |
```
|
| 651 |
|
| 652 |
#### `fpos` members <a id="fpos.members">[[fpos.members]]</a>
|
|
@@ -1242,23 +1245,23 @@ ios_base& defaultfloat(ios_base& str);
|
|
| 1242 |
*Returns:* `str`.
|
| 1243 |
|
| 1244 |
#### Error reporting <a id="error.reporting">[[error.reporting]]</a>
|
| 1245 |
|
| 1246 |
``` cpp
|
| 1247 |
-
error_code make_error_code(io_errc e);
|
| 1248 |
```
|
| 1249 |
|
| 1250 |
*Returns:* `error_code(static_cast<int>(e), iostream_category())`.
|
| 1251 |
|
| 1252 |
``` cpp
|
| 1253 |
-
error_condition make_error_condition(io_errc e);
|
| 1254 |
```
|
| 1255 |
|
| 1256 |
*Returns:* `error_condition(static_cast<int>(e), iostream_category())`.
|
| 1257 |
|
| 1258 |
``` cpp
|
| 1259 |
-
const error_category& iostream_category();
|
| 1260 |
```
|
| 1261 |
|
| 1262 |
*Returns:* A reference to an object of a type derived from class
|
| 1263 |
`error_category`.
|
| 1264 |
|
|
|
|
| 56 |
enum class io_errc {
|
| 57 |
stream = 1
|
| 58 |
};
|
| 59 |
|
| 60 |
template <> struct is_error_code_enum<io_errc> : public true_type { };
|
| 61 |
+
error_code make_error_code(io_errc e) noexcept;
|
| 62 |
+
error_condition make_error_condition(io_errc e) noexcept;
|
| 63 |
+
const error_category& iostream_category() noexcept;
|
| 64 |
}
|
| 65 |
```
|
| 66 |
|
| 67 |
### Types <a id="stream.types">[[stream.types]]</a>
|
| 68 |
|
|
|
|
| 127 |
static constexpr openmode out = unspecified;
|
| 128 |
static constexpr openmode trunc = unspecified;
|
| 129 |
|
| 130 |
// [ios::seekdir] seekdir
|
| 131 |
typedef T4 seekdir;
|
| 132 |
+
static constexpr seekdir beg = unspecified;
|
| 133 |
+
static constexpr seekdir cur = unspecified;
|
| 134 |
+
static constexpr seekdir end = unspecified;
|
| 135 |
|
| 136 |
class Init;
|
| 137 |
|
| 138 |
// [fmtflags.state] fmtflags state:
|
| 139 |
fmtflags flags() const;
|
|
|
|
| 171 |
|
| 172 |
protected:
|
| 173 |
ios_base();
|
| 174 |
|
| 175 |
private:
|
| 176 |
+
static int index; // exposition only
|
| 177 |
+
long* iarray; // exposition only
|
| 178 |
+
void** parray; // exposition only
|
| 179 |
};
|
| 180 |
}
|
| 181 |
```
|
| 182 |
|
| 183 |
`ios_base`
|
|
|
|
| 233 |
stream library would typically be reported as
|
| 234 |
`error_code(io_errc::stream,
|
| 235 |
iostream_category())`.
|
| 236 |
|
| 237 |
``` cpp
|
| 238 |
+
explicit failure(const string& msg, const error_code& ec = io_errc::stream);
|
| 239 |
```
|
| 240 |
|
| 241 |
*Effects:* Constructs an object of class `failure` by constructing the
|
| 242 |
base class with `msg` and `ec`.
|
| 243 |
|
|
|
|
| 360 |
class ios_base::Init {
|
| 361 |
public:
|
| 362 |
Init();
|
| 363 |
~Init();
|
| 364 |
private:
|
| 365 |
+
static int init_cnt; // exposition only
|
| 366 |
};
|
| 367 |
}
|
| 368 |
```
|
| 369 |
|
| 370 |
The class `Init` describes an object whose construction ensures the
|
|
|
|
| 525 |
```
|
| 526 |
|
| 527 |
is the same as the effect of
|
| 528 |
|
| 529 |
``` cpp
|
| 530 |
+
c = str.rdbuf()->sbumpc();
|
| 531 |
```
|
| 532 |
|
| 533 |
for any sequences of characters; and the effect of pushing back a
|
| 534 |
character `c` by
|
| 535 |
|
|
|
|
| 551 |
static int xalloc();
|
| 552 |
```
|
| 553 |
|
| 554 |
*Returns:* `index` `++`.
|
| 555 |
|
| 556 |
+
*Remarks:* Concurrent access to this function by multiple threads shall
|
| 557 |
+
not result in a data race ([[intro.multithread]]).
|
| 558 |
+
|
| 559 |
``` cpp
|
| 560 |
long& iword(int idx);
|
| 561 |
```
|
| 562 |
|
| 563 |
*Effects:* If `iarray` is a null pointer, allocates an array of `long`
|
|
|
|
| 627 |
construction. The object’s members shall be initialized by calling
|
| 628 |
`basic_ios::init` before the object’s first use or before it is
|
| 629 |
destroyed, whichever comes first; otherwise the behavior is undefined.
|
| 630 |
|
| 631 |
``` cpp
|
| 632 |
+
~ios_base();
|
| 633 |
```
|
| 634 |
|
| 635 |
*Effects:* Destroys an object of class `ios_base`. Calls each registered
|
| 636 |
callback pair `(fn, index)` ([[ios.base.callback]]) as
|
| 637 |
`(*fn)(erase_event, *this, index)` at such time that any `ios_base`
|
|
|
|
| 645 |
public:
|
| 646 |
// [fpos.members] Members
|
| 647 |
stateT state() const;
|
| 648 |
void state(stateT);
|
| 649 |
private;
|
| 650 |
+
stateT st; // exposition only
|
| 651 |
};
|
| 652 |
}
|
| 653 |
```
|
| 654 |
|
| 655 |
#### `fpos` members <a id="fpos.members">[[fpos.members]]</a>
|
|
|
|
| 1245 |
*Returns:* `str`.
|
| 1246 |
|
| 1247 |
#### Error reporting <a id="error.reporting">[[error.reporting]]</a>
|
| 1248 |
|
| 1249 |
``` cpp
|
| 1250 |
+
error_code make_error_code(io_errc e) noexcept;
|
| 1251 |
```
|
| 1252 |
|
| 1253 |
*Returns:* `error_code(static_cast<int>(e), iostream_category())`.
|
| 1254 |
|
| 1255 |
``` cpp
|
| 1256 |
+
error_condition make_error_condition(io_errc e) noexcept;
|
| 1257 |
```
|
| 1258 |
|
| 1259 |
*Returns:* `error_condition(static_cast<int>(e), iostream_category())`.
|
| 1260 |
|
| 1261 |
``` cpp
|
| 1262 |
+
const error_category& iostream_category() noexcept;
|
| 1263 |
```
|
| 1264 |
|
| 1265 |
*Returns:* A reference to an object of a type derived from class
|
| 1266 |
`error_category`.
|
| 1267 |
|