tmp/tmpwebza1hi/{from.md → to.md}
RENAMED
|
@@ -20,13 +20,12 @@ template <class charT, class traits>
|
|
| 20 |
*Returns:* An object of unspecified type such that if `out` is an
|
| 21 |
instance of `basic_ostream` with member type `char_type` the same as
|
| 22 |
`charT` and with member type `traits_type`, which in the second and
|
| 23 |
third forms is the same as `traits`, then the expression
|
| 24 |
`out << quoted(s, delim, escape)` behaves as a formatted output
|
| 25 |
-
function
|
| 26 |
-
|
| 27 |
-
elements:
|
| 28 |
|
| 29 |
- `delim`.
|
| 30 |
- Each character in `s`. If the character to be output is equal to
|
| 31 |
`escape` or `delim`, as determined by `traits_type::eq`, first output
|
| 32 |
`escape`.
|
|
@@ -34,11 +33,11 @@ elements:
|
|
| 34 |
|
| 35 |
Let `x` be the number of elements initially in `seq`. Then padding is
|
| 36 |
determined for `seq` as described in [[ostream.formatted.reqmts]],
|
| 37 |
`seq` is inserted as if by calling `out.rdbuf()->sputn(seq, n)`, where
|
| 38 |
`n` is the larger of `out.width()` and `x`, and `out.width(0)` is
|
| 39 |
-
called. The expression `out << quoted(s, delim, escape)`
|
| 40 |
`basic_ostream<charT, traits>&` and value `out`.
|
| 41 |
|
| 42 |
``` cpp
|
| 43 |
template<class charT, class traits, class Allocator>
|
| 44 |
unspecified quoted(basic_string<charT, traits, Allocator>& s,
|
|
@@ -49,12 +48,13 @@ template <class charT, class traits, class Allocator>
|
|
| 49 |
|
| 50 |
- If `in` is an instance of `basic_istream` with member types
|
| 51 |
`char_type` and `traits_type` the same as `charT` and `traits`,
|
| 52 |
respectively, then the expression `in >> quoted(s, delim, escape)`
|
| 53 |
behaves as if it extracts the following characters from `in` using
|
| 54 |
-
`operator>>(basic_istream<charT, traits>&, charT&)`
|
| 55 |
-
which may throw `ios_base::failure`
|
|
|
|
| 56 |
- If the first character extracted is equal to `delim`, as determined
|
| 57 |
by `traits_type::eq`, then:
|
| 58 |
- Turn off the `skipws` flag.
|
| 59 |
- `s.clear()`
|
| 60 |
- Until an unescaped `delim` character is reached or `!in`, extract
|
|
@@ -68,11 +68,10 @@ template <class charT, class traits, class Allocator>
|
|
| 68 |
`char_type` and `traits_type` the same as `charT` and `traits`,
|
| 69 |
respectively, then the expression `out << quoted(s, delim, escape)`
|
| 70 |
behaves as specified for the
|
| 71 |
`const basic_string<charT, traits, Allocator>&` overload of the
|
| 72 |
`quoted` function.
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
`out << quoted(s, delim, escape)` shall have type
|
| 77 |
`basic_ostream<charT, traits>&` and value `out`.
|
| 78 |
|
|
|
|
| 20 |
*Returns:* An object of unspecified type such that if `out` is an
|
| 21 |
instance of `basic_ostream` with member type `char_type` the same as
|
| 22 |
`charT` and with member type `traits_type`, which in the second and
|
| 23 |
third forms is the same as `traits`, then the expression
|
| 24 |
`out << quoted(s, delim, escape)` behaves as a formatted output
|
| 25 |
+
function [[ostream.formatted.reqmts]] of `out`. This forms a character
|
| 26 |
+
sequence `seq`, initially consisting of the following elements:
|
|
|
|
| 27 |
|
| 28 |
- `delim`.
|
| 29 |
- Each character in `s`. If the character to be output is equal to
|
| 30 |
`escape` or `delim`, as determined by `traits_type::eq`, first output
|
| 31 |
`escape`.
|
|
|
|
| 33 |
|
| 34 |
Let `x` be the number of elements initially in `seq`. Then padding is
|
| 35 |
determined for `seq` as described in [[ostream.formatted.reqmts]],
|
| 36 |
`seq` is inserted as if by calling `out.rdbuf()->sputn(seq, n)`, where
|
| 37 |
`n` is the larger of `out.width()` and `x`, and `out.width(0)` is
|
| 38 |
+
called. The expression `out << quoted(s, delim, escape)` has type
|
| 39 |
`basic_ostream<charT, traits>&` and value `out`.
|
| 40 |
|
| 41 |
``` cpp
|
| 42 |
template<class charT, class traits, class Allocator>
|
| 43 |
unspecified quoted(basic_string<charT, traits, Allocator>& s,
|
|
|
|
| 48 |
|
| 49 |
- If `in` is an instance of `basic_istream` with member types
|
| 50 |
`char_type` and `traits_type` the same as `charT` and `traits`,
|
| 51 |
respectively, then the expression `in >> quoted(s, delim, escape)`
|
| 52 |
behaves as if it extracts the following characters from `in` using
|
| 53 |
+
`operator>>(basic_istream<charT, traits>&, charT&)`
|
| 54 |
+
[[istream.extractors]] which may throw `ios_base::failure`
|
| 55 |
+
[[ios.failure]]:
|
| 56 |
- If the first character extracted is equal to `delim`, as determined
|
| 57 |
by `traits_type::eq`, then:
|
| 58 |
- Turn off the `skipws` flag.
|
| 59 |
- `s.clear()`
|
| 60 |
- Until an unescaped `delim` character is reached or `!in`, extract
|
|
|
|
| 68 |
`char_type` and `traits_type` the same as `charT` and `traits`,
|
| 69 |
respectively, then the expression `out << quoted(s, delim, escape)`
|
| 70 |
behaves as specified for the
|
| 71 |
`const basic_string<charT, traits, Allocator>&` overload of the
|
| 72 |
`quoted` function.
|
| 73 |
+
- The expression `in >> quoted(s, delim, escape)` has type
|
| 74 |
+
`basic_istream<charT, traits>&` and value `in`.
|
| 75 |
+
- The expression `out << quoted(s, delim, escape)` has type
|
|
|
|
| 76 |
`basic_ostream<charT, traits>&` and value `out`.
|
| 77 |
|