From d90045212d53f99eadc94464d7ca4ce361e0f098 Mon Sep 17 00:00:00 2001 From: F Date: Wed, 26 Sep 2018 23:13:58 +0200 Subject: [PATCH] Better explain that from_stream does not change the value of the target (#389) in case of an error and that !ok() is not an indication of error. Fixes issue #387. --- date.html | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/date.html b/date.html index e8bdd0e..a0aeb8c 100644 --- a/date.html +++ b/date.html @@ -1723,6 +1723,9 @@ flags): %H, %I, %M, %p, %Z (if present) will be placed in *abbrev. If offset is not equal to nullptr, the information parsed by %z (if present) will be placed in *offset. +If an invalid date is parsed, or a time of day which is outside of the +conventional bounds, failbit will be set and d will +not be altered.

Returns: is. @@ -2372,6 +2375,9 @@ flags): %e, %e, %n, %Z (if present) will be placed in *abbrev. If offset is not equal to nullptr, the information parsed by %z (if present) will be placed in *offset. +If an invalid date is parsed, or a time of day which is outside of the +conventional bounds, failbit will be set and d will +not be altered. In particular !d.ok() is not an indication of error.

Returns: is. @@ -2764,6 +2770,9 @@ flags): %b, %B, %h, %m, %Z (if present) will be placed in *abbrev. If offset is not equal to nullptr, the information parsed by %z (if present) will be placed in *offset. +If an invalid date is parsed, or a time of day which is outside of the +conventional bounds, failbit will be set and y will +not be altered. In particular !m.ok() is not an indication of error.

Returns: is. @@ -3193,6 +3202,9 @@ flags): %C, %y, %Y, %n, %Z (if present) will be placed in *abbrev. If offset is not equal to nullptr, the information parsed by %z (if present) will be placed in *offset. +If an invalid date is parsed, or a time of day which is outside of the +conventional bounds, failbit will be set and y will +not be altered. In particular !y.ok() is not an indication of error.

Returns: is. @@ -3600,6 +3612,9 @@ flags): %a, %A, %u, %w, %Z (if present) will be placed in *abbrev. If offset is not equal to nullptr, the information parsed by %z (if present) will be placed in *offset. +If an invalid date is parsed, or a time of day which is outside of the +conventional bounds, failbit will be set and wd will +not be altered. In particular !wd.ok() is not an indication of error.

Returns: is. @@ -4093,6 +4108,9 @@ flags): %b, %B, %d, %e, placed in *abbrev. If offset is not equal to nullptr, the information parsed by %z (if present) will be placed in *offset. +If an invalid date is parsed, or a time of day which is outside of the +conventional bounds, failbit will be set and md will +not be altered. In particular !md.ok() is not an indication of error.

Returns: is. @@ -4877,6 +4895,9 @@ to nullptr, the information parsed by %Z (if present) placed in *abbrev. If offset is not equal to nullptr, the information parsed by %z (if present) will be placed in *offset. +If an invalid date is parsed, or a time of day which is outside of the +conventional bounds, failbit will be set and ym will +not be altered. In particular !ym.ok() is not an indication of error.

Returns: is. @@ -5361,6 +5382,9 @@ from_stream(std::basic_istream<CharT, Traits>& is, const CharT* fmt, y %Z (if present) will be placed in *abbrev. If offset is not equal to nullptr, the information parsed by %z (if present) will be placed in *offset. +If an invalid date is parsed, or a time of day which is outside of the +conventional bounds, failbit will be set and ymd will +not be altered. In particular !ymd.ok() is not an indication of error.

Returns: is.