From Jason Turner

[locale.time.get.virtuals]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmphc6_le52/{from.md → to.md} +32 -31
tmp/tmphc6_le52/{from.md → to.md} RENAMED
@@ -4,37 +4,38 @@
4
  dateorder do_date_order() const;
5
  ```
6
 
7
  *Returns:* An enumeration value indicating the preferred order of
8
  components for those date formats that are composed of day, month, and
9
- year.[^16] Returns `no_order` if the date format specified by `’x’`
10
- contains other variable components (e.g., Julian day, week number, week
11
- day).
 
12
 
13
  ``` cpp
14
  iter_type do_get_time(iter_type s, iter_type end, ios_base& str,
15
  ios_base::iostate& err, tm* t) const;
16
  ```
17
 
18
  *Effects:* Reads characters starting at `s` until it has extracted those
19
- `struct tm` members, and remaining format characters, used by
20
- `time_put<>::put` to produce the format specified by `"%H:%M:%S"`, or
21
- until it encounters an error or end of sequence.
22
 
23
  *Returns:* An iterator pointing immediately beyond the last character
24
  recognized as possibly part of a valid time.
25
 
26
  ``` cpp
27
  iter_type do_get_date(iter_type s, iter_type end, ios_base& str,
28
  ios_base::iostate& err, tm* t) const;
29
  ```
30
 
31
  *Effects:* Reads characters starting at `s` until it has extracted those
32
- `struct tm` members and remaining format characters used by
33
- `time_put<>::put` to produce one of the following formats, or until it
34
- encounters an error. The format depends on the value returned by
35
- `date_order()` as shown in [[locale.time.get.dogetdate]].
36
 
37
  **Table: `do_get_date` effects** <a id="locale.time.get.dogetdate">[locale.time.get.dogetdate]</a>
38
 
39
  | `date_order()` | Format |
40
  | -------------- | ---------- |
@@ -58,13 +59,13 @@ iter_type do_get_monthname(iter_type s, iter_type end, ios_base& str,
58
  ios_base::iostate& err, tm* t) const;
59
  ```
60
 
61
  *Effects:* Reads characters starting at `s` until it has extracted the
62
  (perhaps abbreviated) name of a weekday or month. If it finds an
63
- abbreviation that is followed by characters that could match a full
64
- name, it continues reading until it matches the full name or fails. It
65
- sets the appropriate `struct tm` member accordingly.
66
 
67
  *Returns:* An iterator pointing immediately beyond the last character
68
  recognized as part of a valid name.
69
 
70
  ``` cpp
@@ -87,31 +88,31 @@ iter_type do_get(iter_type s, iter_type end, ios_base& f,
87
 
88
  *Preconditions:* `t` points to an object.
89
 
90
  *Effects:* The function starts by evaluating `err = ios_base::goodbit`.
91
  It then reads characters starting at `s` until it encounters an error,
92
- or until it has extracted and assigned those `struct tm` members, and
93
- any remaining format characters, corresponding to a conversion directive
94
- appropriate for the ISO/IEC 9945 function `strptime`, formed by
95
- concatenating `’%’`, the `modifier` character, when non-NUL, and the
96
- `format` character. When the concatenation fails to yield a complete
97
- valid directive the function leaves the object pointed to by `t`
98
- unchanged and evaluates `err |= ios_base::failbit`. When `s == end`
99
- evaluates to `true` after reading a character the function evaluates
100
  `err |= ios_base::eofbit`.
101
 
102
- For complex conversion directives such as `%c`, `%x`, or `%X`, or
103
- directives that involve the optional modifiers `E` or `O`, when the
104
- function is unable to unambiguously determine some or all `struct tm`
105
- members from the input sequence \[`s`, `end`), it evaluates
106
- `err |= ios_base::eofbit`. In such cases the values of those `struct tm`
107
  members are unspecified and may be outside their valid range.
108
 
109
- *Remarks:* It is unspecified whether multiple calls to `do_get()` with
110
- the address of the same `struct tm` object will update the current
111
- contents of the object or simply overwrite its members. Portable
112
- programs should zero out the object before invoking the function.
113
-
114
  *Returns:* An iterator pointing immediately beyond the last character
115
  recognized as possibly part of a valid input sequence for the given
116
  `format` and `modifier`.
117
 
 
 
 
 
 
 
4
  dateorder do_date_order() const;
5
  ```
6
 
7
  *Returns:* An enumeration value indicating the preferred order of
8
  components for those date formats that are composed of day, month, and
9
+ year.[^16]
10
+
11
+ Returns `no_order` if the date format specified by `’x’` contains other
12
+ variable components (e.g., Julian day, week number, week day).
13
 
14
  ``` cpp
15
  iter_type do_get_time(iter_type s, iter_type end, ios_base& str,
16
  ios_base::iostate& err, tm* t) const;
17
  ```
18
 
19
  *Effects:* Reads characters starting at `s` until it has extracted those
20
+ `tm` members, and remaining format characters, used by `time_put<>::put`
21
+ to produce the format specified by `"%H:%M:%S"`, or until it encounters
22
+ an error or end of sequence.
23
 
24
  *Returns:* An iterator pointing immediately beyond the last character
25
  recognized as possibly part of a valid time.
26
 
27
  ``` cpp
28
  iter_type do_get_date(iter_type s, iter_type end, ios_base& str,
29
  ios_base::iostate& err, tm* t) const;
30
  ```
31
 
32
  *Effects:* Reads characters starting at `s` until it has extracted those
33
+ `tm` members and remaining format characters used by `time_put<>::put`
34
+ to produce one of the following formats, or until it encounters an
35
+ error. The format depends on the value returned by `date_order()` as
36
+ shown in [[locale.time.get.dogetdate]].
37
 
38
  **Table: `do_get_date` effects** <a id="locale.time.get.dogetdate">[locale.time.get.dogetdate]</a>
39
 
40
  | `date_order()` | Format |
41
  | -------------- | ---------- |
 
59
  ios_base::iostate& err, tm* t) const;
60
  ```
61
 
62
  *Effects:* Reads characters starting at `s` until it has extracted the
63
  (perhaps abbreviated) name of a weekday or month. If it finds an
64
+ abbreviation that is followed by characters that can match a full name,
65
+ it continues reading until it matches the full name or fails. It sets
66
+ the appropriate `tm` member accordingly.
67
 
68
  *Returns:* An iterator pointing immediately beyond the last character
69
  recognized as part of a valid name.
70
 
71
  ``` cpp
 
88
 
89
  *Preconditions:* `t` points to an object.
90
 
91
  *Effects:* The function starts by evaluating `err = ios_base::goodbit`.
92
  It then reads characters starting at `s` until it encounters an error,
93
+ or until it has extracted and assigned those `tm` members, and any
94
+ remaining format characters, corresponding to a conversion specification
95
+ appropriate for the POSIX function `strptime`, formed by concatenating
96
+ `’%’`, the `modifier` character, when non-NUL, and the `format`
97
+ character. When the concatenation fails to yield a complete valid
98
+ directive the function leaves the object pointed to by `t` unchanged and
99
+ evaluates `err |= ios_base::failbit`. When `s == end` evaluates to
100
+ `true` after reading a character the function evaluates
101
  `err |= ios_base::eofbit`.
102
 
103
+ For complex conversion specifications such as `%c`, `%x`, or `%X`, or
104
+ conversion specifications that involve the optional modifiers `E` or
105
+ `O`, when the function is unable to unambiguously determine some or all
106
+ `tm` members from the input sequence \[`s`, `end`), it evaluates
107
+ `err |= ios_base::eofbit`. In such cases the values of those `tm`
108
  members are unspecified and may be outside their valid range.
109
 
 
 
 
 
 
110
  *Returns:* An iterator pointing immediately beyond the last character
111
  recognized as possibly part of a valid input sequence for the given
112
  `format` and `modifier`.
113
 
114
+ *Remarks:* It is unspecified whether multiple calls to `do_get()` with
115
+ the address of the same `tm` object will update the current contents of
116
+ the object or simply overwrite its members. Portable programs should
117
+ zero out the object before invoking the function.
118
+