Skip to content

Commit c953bef

Browse files
jensmaurertkoeppe
authored andcommitted
LWG3536 Should chrono::from_stream() assign zero to duration for failure?
1 parent 92fe70a commit c953bef

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

source/time.tex

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2156,9 +2156,8 @@
21562156
into the duration \tcode{d}
21572157
using the format flags given in the NTCTS \tcode{fmt}
21582158
as specified in \ref{time.parse}.
2159-
If the parse parses everything specified by the parsing format flags without error,
2160-
and yet none of the flags impacts a duration,
2161-
\tcode{d} will be assigned a zero value.
2159+
If the parse fails to decode a valid duration,
2160+
\tcode{is.setstate(ios_base::failbit)} is called and \tcode{d} is not modified.
21622161
If \tcode{\%Z} is used and successfully parsed,
21632162
that value will be assigned to \tcode{*abbrev} if \tcode{abbrev} is non-null.
21642163
If \tcode{\%z} (or a modified variant) is used and successfully parsed,

0 commit comments

Comments
 (0)