diff --git a/source/iostreams.tex b/source/iostreams.tex index 67764460d4..c6668217ac 100644 --- a/source/iostreams.tex +++ b/source/iostreams.tex @@ -1204,7 +1204,7 @@ \begin{itemdescr} \pnum \ensures -\tcode{fmtfl == flags()}. +\tcode{fmtfl == flags()} is \keyword{true}. \pnum \returns @@ -1282,7 +1282,7 @@ \begin{itemdescr} \pnum \ensures -\tcode{prec == precision()}. +\tcode{prec == precision()} is \keyword{true}. \pnum \returns @@ -1310,7 +1310,7 @@ \begin{itemdescr} \pnum \ensures -\tcode{wide == width()}. +\tcode{wide == width()} is \keyword{true}. \pnum \returns @@ -1341,7 +1341,7 @@ \pnum \ensures -\tcode{loc == getloc()}. +\tcode{loc == getloc()} is \keyword{true}. \pnum \returns @@ -1749,7 +1749,7 @@ \tcode{O(p)} & \tcode{streamoff} & converts to \tcode{offset} & - \tcode{P(O(p)) == p} \\ \rowsep + \tcode{P(O(p)) == p} is \keyword{true} \\ \rowsep \tcode{p == q} & \tcode{bool} & & @@ -1768,29 +1768,31 @@ \tcode{p + o} & \tcode{P} & \tcode{+} offset & - \remarks With \tcode{ql = p + o;}, then: \tcode{ql - o == p} \\ \rowsep + \remarks With \tcode{ql = p + o;}, then: + \tcode{ql - o == p} is \keyword{true} \\ \rowsep \tcode{pl += o} & \tcode{P\&} & \tcode{+=} offset & \remarks With \tcode{ql = pl;} before the \tcode{+=}, then: - \tcode{pl - o == ql} \\ \rowsep + \tcode{pl - o == ql} is \keyword{true} \\ \rowsep \tcode{p - o} & \tcode{P} & \tcode{-} offset & - \remarks With \tcode{ql = p - o;}, then: \tcode{ql + o == p} \\ \rowsep + \remarks With \tcode{ql = p - o;}, then: + \tcode{ql + o == p} is \keyword{true} \\ \rowsep \tcode{pl -= o} & \tcode{P\&} & \tcode{-=} offset & \remarks With \tcode{ql = pl;} before the \tcode{-=}, then: - \tcode{pl + o == ql} \\ \rowsep + \tcode{pl + o == ql} is \keyword{true} \\ \rowsep \tcode{o + p} & convertible to \tcode{P} & \tcode{p + o} & - \tcode{P(o + p) == p + o} \\ \rowsep + \tcode{P(o + p) == p + o} is \keyword{true} \\ \rowsep \tcode{p - q} & \tcode{streamoff} & distance & - \tcode{p == q + (p - q)} \\ + \tcode{p == q + (p - q)} is \keyword{true} \\ \end{libreqtab4c} \pnum @@ -1980,7 +1982,7 @@ \pnum \ensures -\tcode{tiestr == tie()}. +\tcode{tiestr == tie()} is \keyword{true}. \pnum \returns @@ -2014,7 +2016,7 @@ \pnum \ensures -\tcode{sb == rdbuf()}. +\tcode{sb == rdbuf()} is \keyword{true}. \pnum \returns @@ -2034,7 +2036,7 @@ \tcode{ios_base::imbue(loc)}\iref{ios.base.locales} and if -\tcode{rdbuf() != 0} +\tcode{rdbuf() != 0} is \keyword{true} then \tcode{rdbuf()->pubimbue(loc)}\iref{streambuf.locales}. @@ -2103,7 +2105,7 @@ \pnum \effects If -\tcode{(this == addressof(rhs))} is \tcode{true} +\tcode{this == addressof(rhs)} is \tcode{true}, does nothing. Otherwise assigns to the member objects of \tcode{*this} @@ -2276,8 +2278,8 @@ \begin{itemdescr} \pnum \effects -If \tcode{((state | (rdbuf() ? goodbit : badbit)) \& exceptions()) == 0}, -returns. +If \tcode{((state | (rdbuf() ? goodbit : badbit)) \& exceptions()) == 0} +is \keyword{true}, returns. Otherwise, the function throws an object of class \tcode{ios_base::failure}\iref{ios.failure}, constructed with @@ -2287,11 +2289,11 @@ \pnum \ensures If -\tcode{rdbuf() != 0} +\tcode{rdbuf() != 0} is \keyword{true} then -\tcode{state == rdstate()}; +\tcode{state == rdstate()} is \keyword{true}; otherwise -\tcode{rdstate() == (state | ios_base::badbit)}. +\tcode{rdstate() == (state | ios_base::badbit)} is \keyword{true}. \end{itemdescr} \indexlibrarymember{setstate}{basic_ios}% @@ -2316,7 +2318,7 @@ \begin{itemdescr} \pnum \returns -\tcode{rdstate() == 0} +\tcode{rdstate() == 0} is \keyword{true}. \end{itemdescr} \indexlibrarymember{eof}{basic_ios}% @@ -2399,7 +2401,7 @@ \pnum \ensures -\tcode{except == exceptions()}. +\tcode{except == exceptions()} is \keyword{true}. \end{itemdescr} \rSec2[std.ios.manip]{\tcode{ios_base} manipulators} @@ -3156,14 +3158,15 @@ \begin{itemdescr} \pnum \ensures +The following expressions yield \keyword{true}: \begin{itemize} -\item \tcode{eback() == rhs.eback()} -\item \tcode{gptr() == rhs.gptr()} -\item \tcode{egptr() == rhs.egptr()} -\item \tcode{pbase() == rhs.pbase()} -\item \tcode{pptr() == rhs.pptr()} -\item \tcode{epptr() == rhs.epptr()} -\item \tcode{getloc() == rhs.getloc()} +\item \tcode{eback() == rhs.eback()}, +\item \tcode{gptr() == rhs.gptr()}, +\item \tcode{egptr() == rhs.egptr()}, +\item \tcode{pbase() == rhs.pbase()}, +\item \tcode{pptr() == rhs.pptr()}, +\item \tcode{epptr() == rhs.epptr()}, and +\item \tcode{getloc() == rhs.getloc()}. \end{itemize} \end{itemdescr} @@ -3195,7 +3198,7 @@ \pnum \ensures -\tcode{loc == getloc()}. +\tcode{loc == getloc()} is \keyword{true}. \pnum \returns @@ -3433,14 +3436,15 @@ \begin{itemdescr} \pnum \ensures +The following expressions yield \keyword{true}: \begin{itemize} -\item \tcode{eback() == rhs.eback()} -\item \tcode{gptr() == rhs.gptr()} -\item \tcode{egptr() == rhs.egptr()} -\item \tcode{pbase() == rhs.pbase()} -\item \tcode{pptr() == rhs.pptr()} -\item \tcode{epptr() == rhs.epptr()} -\item \tcode{getloc() == rhs.getloc()} +\item \tcode{eback() == rhs.eback()}, +\item \tcode{gptr() == rhs.gptr()}, +\item \tcode{egptr() == rhs.egptr()}, +\item \tcode{pbase() == rhs.pbase()}, +\item \tcode{pptr() == rhs.pptr()}, +\item \tcode{epptr() == rhs.epptr()}, and +\item \tcode{getloc() == rhs.getloc()}. \end{itemize} \pnum @@ -3846,7 +3850,7 @@ otherwise either \tcode{gptr()} is null or -\tcode{gptr() == egptr()}. +\tcode{gptr() == egptr()} is \keyword{true}. \pnum If @@ -3992,7 +3996,7 @@ call this virtual function only when \tcode{gptr()} is null, -\tcode{gptr() == eback()}, +\tcode{gptr() == eback()} is \keyword{true}, or \tcode{traits::eq(traits::to_char_type(c), gptr()[-1])} returns @@ -4078,7 +4082,7 @@ and \tcode{pptr()} are set so that: -\tcode{pptr() - pbase() == r} +\tcode{pptr() - pbase() == r} is \keyword{true} and the \tcode{r} characters starting at \tcode{pbase()} are the associated output stream. @@ -4445,7 +4449,7 @@ \pnum \ensures -\tcode{gcount() == 0}. +\tcode{gcount() == 0} is \keyword{true}. \end{itemdescr} @@ -4611,13 +4615,8 @@ \end{codeblock} \pnum -If, after any preparation is completed, -\tcode{is.good()} -is -\tcode{true}, -\tcode{\exposid{ok_} != false} -otherwise, -\tcode{\exposid{ok_} == false}. +After any preparation is completed, +\tcode{\exposid{ok_}} equals \tcode{is.good()}. During preparation, the constructor may call \tcode{setstate(failbit)} (which may throw @@ -4689,7 +4688,8 @@ If an exception is thrown during input then \tcode{ios_base::badbit} is set in the local error state, \tcode{*this}'s error state is set to the local error state, and -the exception is rethrown if \tcode{(exceptions() \& badbit) != 0}. +the exception is rethrown +if \tcode{(exceptions() \& badbit) != 0} is \keyword{true}. After extraction is done, the input function calls \tcode{setstate}, which sets \tcode{*this}'s error state to the local error state, and may throw an exception. @@ -5073,7 +5073,8 @@ If an exception is thrown during input then \tcode{ios_base::badbit} is set in the local error state, \tcode{*this}'s error state is set to the local error state, and -the exception is rethrown if \tcode{(exceptions() \& badbit) != 0}. +the exception is rethrown +if \tcode{(exceptions() \& badbit) != 0} is \keyword{true}. If no exception has been thrown it stores the number of characters extracted in a member object. @@ -5402,7 +5403,7 @@ Characters are extracted until any of the following occurs: \begin{itemize} \item -\tcode{n != numeric_limits::max()}\iref{numeric.limits} +\tcode{n != numeric_limits::max()} is \keyword{true}\iref{numeric.limits} and \tcode{n} characters have been extracted so far; \item @@ -5512,7 +5513,7 @@ into successive locations of an array whose first element is designated by \tcode{s}. If -\tcode{rdbuf()->in_avail() == -1}, +\tcode{rdbuf()->in_avail() == -1} is \keyword{true}, calls \tcode{setstate(eofbit)} (which may throw @@ -5521,11 +5522,11 @@ \begin{itemize} \item If -\tcode{rdbuf()->in_avail() == 0}, +\tcode{rdbuf()->in_avail() == 0} is \keyword{true}, extracts no characters \item If -\tcode{rdbuf()->in_avail() > 0}, +\tcode{rdbuf()->in_avail() > 0} is \keyword{true}, extracts \tcode{min(rdbuf()->in_avail(), n))}. \end{itemize} @@ -5663,7 +5664,7 @@ \pnum \returns After constructing a \tcode{sentry} object, if -\tcode{fail() != false}, +\tcode{fail()} is \keyword{true}, returns \tcode{pos_type(-1)} to indicate failure. @@ -5686,7 +5687,7 @@ returned by subsequent calls to \tcode{gcount()}. After constructing a \tcode{sentry} object, if -\tcode{fail() != true}, +\tcode{fail()} is \keyword{false}, executes \tcode{rdbuf()->pubseekpos(pos, ios_base::in)}. In case of failure, the function calls @@ -5711,7 +5712,7 @@ does not count the number of characters extracted, and does not affect the value returned by subsequent calls to \tcode{gcount()}. After constructing a \tcode{sentry} object, if -\tcode{fail() != true}, +\tcode{fail()} is \keyword{false}, executes \tcode{rdbuf()->pubseekoff(off, dir, ios_base::in)}. In case of failure, the function calls \tcode{setstate(\brk{}failbit)} (which may throw @@ -5840,9 +5841,9 @@ \pnum \ensures -\tcode{rdbuf() == sb} +\tcode{rdbuf() == sb} is \keyword{true} and -\tcode{gcount() == 0}. +\tcode{gcount() == 0} is \keyword{true}. \end{itemdescr} \indexlibraryctor{basic_iostream}% @@ -6116,7 +6117,7 @@ \pnum \ensures -\tcode{rdbuf() == sb}. +\tcode{rdbuf() == sb} is \keyword{true}. \end{itemdescr} \indexlibraryctor{basic_ostream}% @@ -6223,13 +6224,8 @@ \end{footnote} \pnum -If, after any preparation is completed, -\tcode{os.good()} -is -\tcode{true}, -\tcode{\exposid{ok_} == true} -otherwise, -\tcode{\exposid{ok_} == false}. +After any preparation is completed, +\tcode{\exposid{ok_}} equals \tcode{os.good()}. During preparation, the constructor may call \tcode{setstate(failbit)} (which may throw @@ -6288,7 +6284,7 @@ \pnum \returns If -\tcode{fail() != false}, +\tcode{fail()} is \keyword{true}, returns \tcode{pos_type(-1)} to indicate failure. @@ -6305,7 +6301,7 @@ \pnum \effects If -\tcode{fail() != true}, +\tcode{fail()} is \keyword{false}, executes \tcode{rdbuf()->pubseekpos(pos, ios_base::out)}. In case of failure, the function calls @@ -6327,7 +6323,7 @@ \pnum \effects If -\tcode{fail() != true}, +\tcode{fail()} is \keyword{false}, executes \tcode{rdbuf()->pubseekoff(off, dir, ios_base::out)}. In case of failure, the function calls \tcode{setstate(failbit)}