Skip to content

Commit df81d7a

Browse files
Dawn Perchikzygoloid
authored andcommitted
LWG3043 Bogus postcondition for filesystem_error constructor
1 parent baba435 commit df81d7a

File tree

1 file changed

+18
-40
lines changed

1 file changed

+18
-40
lines changed

source/iostreams.tex

Lines changed: 18 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -12831,19 +12831,11 @@
1283112831

1283212832
\begin{itemdescr}
1283312833
\pnum
12834-
\postconditions The postconditions of this function are indicated in
12835-
Table~\ref{tab:filesystem_error.1}.
12836-
12837-
\begin{floattable}
12838-
{\tcode{filesystem_error(const string\&, error_code)} effects}{tab:filesystem_error.1}
12839-
{ll}
12840-
\topline
12841-
\lhdr{Expression} & \rhdr{Value} \\ \capsep
12842-
\tcode{runtime_error::what()} & \tcode{what_arg.c_str()} \\ \rowsep
12843-
\tcode{code()} & \tcode{ec} \\ \rowsep
12844-
\tcode{path1().empty()} & \tcode{true} \\ \rowsep
12845-
\tcode{path2().empty()} & \tcode{true} \\ \rowsep
12846-
\end{floattable}
12834+
\postconditions
12835+
\tcode{code() == ec},
12836+
\tcode{path1().empty() == true},
12837+
\tcode{path2().empty() == true}, and
12838+
\tcode{string_view(what()).find(what_arg)} \tcode{!= string_view::npos}.
1284712839
\end{itemdescr}
1284812840

1284912841
\indexlibrary{\idxcode{filesystem_error}!constructor}%
@@ -12853,19 +12845,11 @@
1285312845

1285412846
\begin{itemdescr}
1285512847
\pnum
12856-
\postconditions The postconditions of this function are indicated in
12857-
Table~\ref{tab:filesystem_error.2}.
12858-
12859-
\begin{floattable}
12860-
{\tcode{filesystem_error(const string\&, const path\&, error_code)} effects}{tab:filesystem_error.2}
12861-
{ll}
12862-
\topline
12863-
\lhdr{Expression} & \rhdr{Value} \\ \capsep
12864-
\tcode{runtime_error::what()} & \tcode{what_arg.c_str()} \\ \rowsep
12865-
\tcode{code()} & \tcode{ec} \\ \rowsep
12866-
\tcode{path1()} & Reference to stored copy of \tcode{p1} \\ \rowsep
12867-
\tcode{path2().empty()} & \tcode{true} \\ \rowsep
12868-
\end{floattable}
12848+
\postconditions
12849+
\tcode{code() == ec},
12850+
\tcode{path1()} returns a reference to the stored copy of \tcode{p1},
12851+
\tcode{path2().empty() == true}, and
12852+
\tcode{string_view(what()).find(what_arg)} \tcode{!= string_view::npos}.
1286912853
\end{itemdescr}
1287012854

1287112855
\indexlibrary{\idxcode{filesystem_error}!constructor}%
@@ -12875,19 +12859,11 @@
1287512859

1287612860
\begin{itemdescr}
1287712861
\pnum
12878-
\postconditions The postconditions of this function are indicated in
12879-
Table~\ref{tab:filesystem_error.3}.
12880-
12881-
\begin{floattable}
12882-
{\tcode{filesystem_error(const string\&, const path\&, const path\&, error_code)} effects}{tab:filesystem_error.3}
12883-
{ll}
12884-
\topline
12885-
\lhdr{Expression} & \rhdr{Value} \\ \capsep
12886-
\tcode{runtime_error::what()} & \tcode{what_arg.c_str()} \\ \rowsep
12887-
\tcode{code()} & \tcode{ec} \\ \rowsep
12888-
\tcode{path1()} & Reference to stored copy of \tcode{p1} \\ \rowsep
12889-
\tcode{path2()} & Reference to stored copy of \tcode{p2} \\ \rowsep
12890-
\end{floattable}
12862+
\postconditions
12863+
\tcode{code() == ec},
12864+
\tcode{path1()} returns a reference to the stored copy of \tcode{p1},
12865+
\tcode{path2()} returns a reference to the stored copy of \tcode{p2}, and
12866+
\tcode{string_view(what()).find(what_arg)} \tcode{!= string_view::npos}.
1289112867
\end{itemdescr}
1289212868

1289312869
\indexlibrarymember{path1}{filesystem_error}%
@@ -12919,7 +12895,9 @@
1291912895

1292012896
\begin{itemdescr}
1292112897
\pnum
12922-
\returns A string containing \tcode{runtime_error::what()}. The exact format is unspecified.
12898+
\returns An \ntbs{} that incorporates
12899+
the \tcode{what_arg} argument supplied to the constructor.
12900+
The exact format is unspecified.
1292312901
Implementations should include
1292412902
the \tcode{system_error::what()} string and
1292512903
the pathnames of \tcode{path1} and \tcode{path2}

0 commit comments

Comments
 (0)