tmp/tmp4csgd6t6/{from.md → to.md}
RENAMED
|
@@ -30,26 +30,23 @@ formatted input function (as described
|
|
| 30 |
in [[istream.formatted.reqmts]]).
|
| 31 |
|
| 32 |
*Returns:* `*this`.
|
| 33 |
|
| 34 |
``` cpp
|
| 35 |
-
template<class charT, class traits>
|
| 36 |
-
basic_istream<charT, traits>& operator>>(basic_istream<charT, traits>& in, charT
|
| 37 |
-
template<class traits>
|
| 38 |
-
basic_istream<char, traits>& operator>>(basic_istream<char, traits>& in, unsigned char
|
| 39 |
-
template<class traits>
|
| 40 |
-
basic_istream<char, traits>& operator>>(basic_istream<char, traits>& in, signed char
|
| 41 |
```
|
| 42 |
|
| 43 |
*Effects:* Behaves like a formatted input member (as described
|
| 44 |
in [[istream.formatted.reqmts]]) of `in`. After a `sentry` object is
|
| 45 |
-
constructed, `operator>>` extracts characters and stores them into
|
| 46 |
-
|
| 47 |
-
`
|
| 48 |
-
is the number of elements of the largest array of `char_type` that can
|
| 49 |
-
store a terminating `charT()`. `n` is the maximum number of characters
|
| 50 |
-
stored.
|
| 51 |
|
| 52 |
Characters are extracted and stored until any of the following occurs:
|
| 53 |
|
| 54 |
- `n-1` characters are stored;
|
| 55 |
- end of file occurs on the input sequence;
|
|
@@ -59,11 +56,11 @@ Characters are extracted and stored until any of the following occurs:
|
|
| 59 |
`operator>>` then stores a null byte (`charT()`) in the next position,
|
| 60 |
which may be the first position if no characters were extracted.
|
| 61 |
`operator>>` then calls `width(0)`.
|
| 62 |
|
| 63 |
If the function extracted no characters, it calls `setstate(failbit)`,
|
| 64 |
-
which may throw `ios_base::failure`
|
| 65 |
|
| 66 |
*Returns:* `in`.
|
| 67 |
|
| 68 |
``` cpp
|
| 69 |
template<class charT, class traits>
|
|
@@ -83,26 +80,26 @@ stored in `c`. Otherwise, the function calls `in.setstate(failbit)`.
|
|
| 83 |
|
| 84 |
``` cpp
|
| 85 |
basic_istream<charT, traits>& operator>>(basic_streambuf<charT, traits>* sb);
|
| 86 |
```
|
| 87 |
|
| 88 |
-
*Effects:* Behaves as an unformatted input
|
| 89 |
-
|
| 90 |
-
which may throw `ios_base::failure`
|
| 91 |
-
object is constructed, extracts
|
| 92 |
-
|
| 93 |
-
inserted until any of
|
|
|
|
| 94 |
|
| 95 |
- end-of-file occurs on the input sequence;
|
| 96 |
- inserting in the output sequence fails (in which case the character to
|
| 97 |
be inserted is not extracted);
|
| 98 |
- an exception occurs (in which case the exception is caught).
|
| 99 |
|
| 100 |
If the function inserts no characters, it calls `setstate(failbit)`,
|
| 101 |
-
which may throw `ios_base::failure`
|
| 102 |
-
|
| 103 |
-
characters from `*this` and `failbit` is
|
| 104 |
-
|
| 105 |
-
rethrown.
|
| 106 |
|
| 107 |
*Returns:* `*this`.
|
| 108 |
|
|
|
|
| 30 |
in [[istream.formatted.reqmts]]).
|
| 31 |
|
| 32 |
*Returns:* `*this`.
|
| 33 |
|
| 34 |
``` cpp
|
| 35 |
+
template<class charT, class traits, size_t N>
|
| 36 |
+
basic_istream<charT, traits>& operator>>(basic_istream<charT, traits>& in, charT (&s)[N]);
|
| 37 |
+
template<class traits, size_t N>
|
| 38 |
+
basic_istream<char, traits>& operator>>(basic_istream<char, traits>& in, unsigned char (&s)[N]);
|
| 39 |
+
template<class traits, size_t N>
|
| 40 |
+
basic_istream<char, traits>& operator>>(basic_istream<char, traits>& in, signed char (&s)[N]);
|
| 41 |
```
|
| 42 |
|
| 43 |
*Effects:* Behaves like a formatted input member (as described
|
| 44 |
in [[istream.formatted.reqmts]]) of `in`. After a `sentry` object is
|
| 45 |
+
constructed, `operator>>` extracts characters and stores them into `s`.
|
| 46 |
+
If `width()` is greater than zero, `n` is `min(size_t(width()), N)`.
|
| 47 |
+
Otherwise `n` is `N`. `n` is the maximum number of characters stored.
|
|
|
|
|
|
|
|
|
|
| 48 |
|
| 49 |
Characters are extracted and stored until any of the following occurs:
|
| 50 |
|
| 51 |
- `n-1` characters are stored;
|
| 52 |
- end of file occurs on the input sequence;
|
|
|
|
| 56 |
`operator>>` then stores a null byte (`charT()`) in the next position,
|
| 57 |
which may be the first position if no characters were extracted.
|
| 58 |
`operator>>` then calls `width(0)`.
|
| 59 |
|
| 60 |
If the function extracted no characters, it calls `setstate(failbit)`,
|
| 61 |
+
which may throw `ios_base::failure` [[iostate.flags]].
|
| 62 |
|
| 63 |
*Returns:* `in`.
|
| 64 |
|
| 65 |
``` cpp
|
| 66 |
template<class charT, class traits>
|
|
|
|
| 80 |
|
| 81 |
``` cpp
|
| 82 |
basic_istream<charT, traits>& operator>>(basic_streambuf<charT, traits>* sb);
|
| 83 |
```
|
| 84 |
|
| 85 |
+
*Effects:* Behaves as an unformatted input
|
| 86 |
+
function [[istream.unformatted]]. If `sb` is null, calls
|
| 87 |
+
`setstate(failbit)`, which may throw `ios_base::failure`
|
| 88 |
+
[[iostate.flags]]. After a sentry object is constructed, extracts
|
| 89 |
+
characters from `*this` and inserts them in the output sequence
|
| 90 |
+
controlled by `sb`. Characters are extracted and inserted until any of
|
| 91 |
+
the following occurs:
|
| 92 |
|
| 93 |
- end-of-file occurs on the input sequence;
|
| 94 |
- inserting in the output sequence fails (in which case the character to
|
| 95 |
be inserted is not extracted);
|
| 96 |
- an exception occurs (in which case the exception is caught).
|
| 97 |
|
| 98 |
If the function inserts no characters, it calls `setstate(failbit)`,
|
| 99 |
+
which may throw `ios_base::failure` [[iostate.flags]]. If it inserted no
|
| 100 |
+
characters because it caught an exception thrown while extracting
|
| 101 |
+
characters from `*this` and `failbit` is set in `exceptions()`
|
| 102 |
+
[[iostate.flags]], then the caught exception is rethrown.
|
|
|
|
| 103 |
|
| 104 |
*Returns:* `*this`.
|
| 105 |
|