tmp/tmpxlhs65fs/{from.md → to.md}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
| 1 |
##### Character inserter function templates <a id="ostream.inserters.character">[[ostream.inserters.character]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
template<class charT, class traits>
|
| 5 |
basic_ostream<charT,traits>& operator<<(basic_ostream<charT,traits>& out,
|
| 6 |
-
charT c
|
| 7 |
template<class charT, class traits>
|
| 8 |
basic_ostream<charT,traits>& operator<<(basic_ostream<charT,traits>& out,
|
| 9 |
char c);
|
| 10 |
// specialization
|
| 11 |
template<class traits>
|
|
@@ -18,18 +18,17 @@ template<class traits>
|
|
| 18 |
template<class traits>
|
| 19 |
basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>& out,
|
| 20 |
unsigned char c);
|
| 21 |
```
|
| 22 |
|
| 23 |
-
*Effects:* Behaves
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
into `out`.
|
| 31 |
|
| 32 |
*Returns:* `out`.
|
| 33 |
|
| 34 |
``` cpp
|
| 35 |
template<class charT, class traits>
|
|
@@ -50,13 +49,14 @@ template<class traits>
|
|
| 50 |
```
|
| 51 |
|
| 52 |
*Requires:* `s` shall not be a null pointer.
|
| 53 |
|
| 54 |
*Effects:* Behaves like a formatted inserter (as described
|
| 55 |
-
in [[ostream.formatted.reqmts]]) of `out`.
|
| 56 |
-
|
| 57 |
-
|
|
|
|
| 58 |
|
| 59 |
- `traits::length(s)` for the overload where the first argument is of
|
| 60 |
type `basic_ostream<charT, traits>&` and the second is of type
|
| 61 |
`const charT*`, and also for the overload where the first argument is
|
| 62 |
of type `basic_ostream<char, traits>&` and the second is of type
|
|
@@ -65,12 +65,11 @@ number that would be computed as if by:
|
|
| 65 |
argument is of type `basic_ostream<charT, traits>&` and the second is
|
| 66 |
of type `const char*`,
|
| 67 |
- `traits::length(reinterpret_cast<const char*>(s))` for the other two
|
| 68 |
overloads.
|
| 69 |
|
| 70 |
-
|
| 71 |
-
`
|
| 72 |
-
`
|
| 73 |
-
required padding are inserted into `out`. Calls `width(0)`.
|
| 74 |
|
| 75 |
*Returns:* `out`.
|
| 76 |
|
|
|
|
| 1 |
##### Character inserter function templates <a id="ostream.inserters.character">[[ostream.inserters.character]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
template<class charT, class traits>
|
| 5 |
basic_ostream<charT,traits>& operator<<(basic_ostream<charT,traits>& out,
|
| 6 |
+
charT c);
|
| 7 |
template<class charT, class traits>
|
| 8 |
basic_ostream<charT,traits>& operator<<(basic_ostream<charT,traits>& out,
|
| 9 |
char c);
|
| 10 |
// specialization
|
| 11 |
template<class traits>
|
|
|
|
| 18 |
template<class traits>
|
| 19 |
basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>& out,
|
| 20 |
unsigned char c);
|
| 21 |
```
|
| 22 |
|
| 23 |
+
*Effects:* Behaves as a formatted output function
|
| 24 |
+
( [[ostream.formatted.reqmts]]) of `out`. Constructs a character
|
| 25 |
+
sequence `seq`. If `c` has type `char` and the character type of the
|
| 26 |
+
stream is not `char`, then `seq` consists of `out.widen(c)`; otherwise
|
| 27 |
+
`seq` consists of `c`. Determines padding for `seq` as described
|
| 28 |
+
in [[ostream.formatted.reqmts]]. Inserts `seq` into `out`. Calls
|
| 29 |
+
`os.width(0)`.
|
|
|
|
| 30 |
|
| 31 |
*Returns:* `out`.
|
| 32 |
|
| 33 |
``` cpp
|
| 34 |
template<class charT, class traits>
|
|
|
|
| 49 |
```
|
| 50 |
|
| 51 |
*Requires:* `s` shall not be a null pointer.
|
| 52 |
|
| 53 |
*Effects:* Behaves like a formatted inserter (as described
|
| 54 |
+
in [[ostream.formatted.reqmts]]) of `out`. Creates a character sequence
|
| 55 |
+
`seq` of `n` characters starting at `s`, each widened using
|
| 56 |
+
`out.widen()` ([[basic.ios.members]]), where `n` is the number that
|
| 57 |
+
would be computed as if by:
|
| 58 |
|
| 59 |
- `traits::length(s)` for the overload where the first argument is of
|
| 60 |
type `basic_ostream<charT, traits>&` and the second is of type
|
| 61 |
`const charT*`, and also for the overload where the first argument is
|
| 62 |
of type `basic_ostream<char, traits>&` and the second is of type
|
|
|
|
| 65 |
argument is of type `basic_ostream<charT, traits>&` and the second is
|
| 66 |
of type `const char*`,
|
| 67 |
- `traits::length(reinterpret_cast<const char*>(s))` for the other two
|
| 68 |
overloads.
|
| 69 |
|
| 70 |
+
Determines padding for `seq` as described
|
| 71 |
+
in [[ostream.formatted.reqmts]]. Inserts `seq` into `out`. Calls
|
| 72 |
+
`width(0)`.
|
|
|
|
| 73 |
|
| 74 |
*Returns:* `out`.
|
| 75 |
|