Skip to content

Commit bec4ff5

Browse files
jwakelytkoeppe
authored andcommitted
[stream.types] Move subclause near the start of [iostreams]
Correct footnote about how uses of streamsize relate to C.
1 parent 09744a2 commit bec4ff5

File tree

1 file changed

+36
-35
lines changed

1 file changed

+36
-35
lines changed

source/iostreams.tex

Lines changed: 36 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,42 @@
5656
\tcode{imbue},
5757
the behavior is undefined.
5858

59+
\rSec2[stream.types]{Types}
60+
61+
\indexlibraryglobal{streamoff}%
62+
\begin{itemdecl}
63+
using streamoff = @\impdefx{type of \tcode{streamoff}}@;
64+
\end{itemdecl}
65+
66+
\begin{itemdescr}
67+
\pnum
68+
The type \tcode{streamoff} is a synonym for one of the signed basic integral types of
69+
sufficient size to represent the maximum possible file size for the operating system.
70+
\begin{footnote}
71+
Typically \tcode{long long}.
72+
\end{footnote}
73+
\end{itemdescr}
74+
75+
\indexlibraryglobal{streamsize}%
76+
\begin{itemdecl}
77+
using streamsize = @\impdef@;
78+
\end{itemdecl}
79+
80+
\begin{itemdescr}
81+
\pnum
82+
The type
83+
\tcode{streamsize}
84+
is a synonym for one of the signed basic
85+
integral types.
86+
It is used to represent the number of characters transferred in an I/O
87+
operation, or the size of I/O buffers.
88+
\begin{footnote}
89+
Most places where \tcode{streamsize} is used would use \tcode{size_t} in ISO C,
90+
or \tcode{ssize_t} in POSIX.
91+
\end{footnote}
92+
\end{itemdescr}
93+
94+
5995
\rSec2[iostreams.limits.pos]{Positioning type limitations}
6096

6197
\pnum
@@ -698,41 +734,6 @@
698734
\indexlibraryglobal{basic_ios<wchar_t>}%
699735
\indexlibraryglobal{fpos}%
700736

701-
\rSec2[stream.types]{Types}
702-
703-
\indexlibraryglobal{streamoff}%
704-
\begin{itemdecl}
705-
using streamoff = @\impdefx{type of \tcode{streamoff}}@;
706-
\end{itemdecl}
707-
708-
\begin{itemdescr}
709-
\pnum
710-
The type \tcode{streamoff} is a synonym for one of the signed basic integral types of
711-
sufficient size to represent the maximum possible file size for the operating system.
712-
\begin{footnote}
713-
Typically \tcode{long long}.
714-
\end{footnote}
715-
\end{itemdescr}
716-
717-
\indexlibraryglobal{streamsize}%
718-
\begin{itemdecl}
719-
using streamsize = @\impdefx{type of \tcode{streamsize}}@;
720-
\end{itemdecl}
721-
722-
\begin{itemdescr}
723-
\pnum
724-
The type
725-
\tcode{streamsize}
726-
is a synonym for one of the signed basic
727-
integral types.
728-
It is used to represent the number of characters transferred in an I/O
729-
operation, or the size of I/O buffers.
730-
\begin{footnote}
731-
\tcode{streamsize}
732-
is used in most places where ISO C would use \tcode{size_t}.
733-
\end{footnote}
734-
\end{itemdescr}
735-
736737
\rSec2[ios.base]{Class \tcode{ios_base}}
737738

738739
\rSec3[ios.base.general]{General}

0 commit comments

Comments
 (0)