Skip to content

Commit 23b74d7

Browse files
jensmaurertkoeppe
authored andcommitted
LWG3598 system_category().default_error_condition(0) is underspecified
1 parent 24a304f commit 23b74d7

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

source/diagnostics.tex

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,11 +1046,13 @@
10461046
pointer to the string \tcode{"system"}. The object's \tcode{default_error_condition}
10471047
virtual function shall behave as follows:
10481048

1049-
If the argument \tcode{ev} corresponds to a POSIX \tcode{errno} value \tcode{posv}, the
1050-
function shall return \tcode{error_condition(posv, generic_category())}.
1051-
Otherwise, the function shall return \tcode{error_condition(ev,
1052-
system_category())}. What constitutes correspondence for any given operating
1053-
system is unspecified.
1049+
If the argument \tcode{ev} is equal to 0,
1050+
the function returns \tcode{error_condition(0, generic_category())}.
1051+
Otherwise,
1052+
if \tcode{ev} corresponds to a POSIX \tcode{errno} value \tcode{pxv},
1053+
the function returns \tcode{error_condition(pxv, generic_category())}.
1054+
Otherwise, the function returns \tcode{error_condition(ev, system_category())}.
1055+
What constitutes correspondence for any given operating system is unspecified.
10541056
\begin{note}
10551057
The number of potential system error codes is large
10561058
and unbounded, and some might not correspond to any POSIX \tcode{errno} value. Thus

0 commit comments

Comments
 (0)