Skip to content

Commit d4ffff1

Browse files
jensmaurertkoeppe
authored andcommitted
[input.output] Use \tcode{sentry} for the nested class
1 parent 8bc0668 commit d4ffff1

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

source/iostreams.tex

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4653,7 +4653,7 @@
46534653
locale's
46544654
\tcode{num_get<>}\iref{locale.num.get} object to perform parsing the input
46554655
stream data.
4656-
These extractors behave as formatted input functions (as described in~\ref{istream.formatted.reqmts}). After a sentry object is constructed, the
4656+
These extractors behave as formatted input functions (as described in~\ref{istream.formatted.reqmts}). After a \tcode{sentry} object is constructed, the
46574657
conversion occurs as if performed by the following code fragment:
46584658
\begin{codeblock}
46594659
using numget = num_get<charT, istreambuf_iterator<charT, traits>>;
@@ -4895,7 +4895,7 @@
48954895
\tcode{setstate(fail\-bit)},
48964896
which may throw
48974897
\tcode{ios_base::failure}\iref{iostate.flags}.
4898-
After a sentry object is constructed, extracts
4898+
After a \tcode{sentry} object is constructed, extracts
48994899
characters from
49004900
\tcode{*this}
49014901
and inserts them in the output sequence controlled by \tcode{sb}.
@@ -4946,8 +4946,8 @@
49464946
\tcode{bool},
49474947
the function endeavors
49484948
to obtain the requested input.
4949-
Otherwise, if the sentry constructor exits by throwing an exception or if
4950-
the sentry object returns \tcode{false}, when converted to a value of type
4949+
Otherwise, if the \tcode{sentry} constructor exits by throwing an exception or if
4950+
the \tcode{sentry} object returns \tcode{false}, when converted to a value of type
49514951
\tcode{bool},
49524952
the function returns without attempting to obtain any input.
49534953
In either case the number of extracted characters is set to 0;
@@ -5011,7 +5011,7 @@
50115011
\effects
50125012
Behaves as an unformatted input function
50135013
(as described above).
5014-
After constructing a sentry object, extracts
5014+
After constructing a \tcode{sentry} object, extracts
50155015
a character \tcode{c}, if one is available.
50165016
Otherwise, the function calls
50175017
\tcode{setstate(failbit)},
@@ -5035,7 +5035,7 @@
50355035
\effects
50365036
Behaves as an unformatted input function
50375037
(as described above).
5038-
After constructing a sentry object, extracts
5038+
After constructing a \tcode{sentry} object, extracts
50395039
a character, if one is available, and assigns it to \tcode{c}.
50405040
\begin{footnote}
50415041
Note
@@ -5064,7 +5064,7 @@
50645064
\effects
50655065
Behaves as an unformatted input function
50665066
(as described above).
5067-
After constructing a sentry object, extracts
5067+
After constructing a \tcode{sentry} object, extracts
50685068
characters and stores them
50695069
into successive locations of an array whose first element is designated by
50705070
\tcode{s}.
@@ -5129,7 +5129,7 @@
51295129
\effects
51305130
Behaves as an unformatted input function
51315131
(as described above).
5132-
After constructing a sentry object, extracts
5132+
After constructing a \tcode{sentry} object, extracts
51335133
characters and inserts them
51345134
in the output sequence controlled by
51355135
\tcode{sb}.
@@ -5186,7 +5186,7 @@
51865186
\effects
51875187
Behaves as an unformatted input function
51885188
(as described above).
5189-
After constructing a sentry object, extracts
5189+
After constructing a \tcode{sentry} object, extracts
51905190
characters and stores them
51915191
into successive locations of an array whose first element is designated by
51925192
\tcode{s}.
@@ -5302,7 +5302,7 @@
53025302
\effects
53035303
Behaves as an unformatted input function
53045304
(as described above).
5305-
After constructing a sentry object, extracts
5305+
After constructing a \tcode{sentry} object, extracts
53065306
characters and discards them.
53075307
Characters are extracted until any of the following occurs:
53085308
\begin{itemize}
@@ -5341,7 +5341,7 @@
53415341
\effects
53425342
Behaves as an unformatted input function
53435343
(as described above).
5344-
After constructing a sentry object, reads but does not extract
5344+
After constructing a \tcode{sentry} object, reads but does not extract
53455345
the current input character.
53465346

53475347
\pnum
@@ -5365,7 +5365,7 @@
53655365
\effects
53665366
Behaves as an unformatted input function (as described above).
53675367
After constructing
5368-
a sentry object, if
5368+
a \tcode{sentry} object, if
53695369
\tcode{!good()}
53705370
calls
53715371
\tcode{setstate(failbit)}
@@ -5407,7 +5407,7 @@
54075407
\effects
54085408
Behaves as an unformatted input function (as described above).
54095409
After constructing
5410-
a sentry object, if
5410+
a \tcode{sentry} object, if
54115411
\tcode{!good()}
54125412
calls
54135413
\tcode{setstate(failbit)}
@@ -5450,7 +5450,7 @@
54505450
\effects
54515451
Behaves as an unformatted input function (as described above), except that the function first clears \tcode{eofbit}.
54525452
After constructing
5453-
a sentry object, if
5453+
a \tcode{sentry} object, if
54545454
\tcode{!good()}
54555455
calls
54565456
\tcode{setstate(failbit)}
@@ -5492,7 +5492,7 @@
54925492
\effects
54935493
Behaves as an unformatted input function (as described above), except that the function first clears \tcode{eofbit}.
54945494
After constructing
5495-
a sentry object, if
5495+
a \tcode{sentry} object, if
54965496
\tcode{!good()}
54975497
calls
54985498
\tcode{setstate(failbit)}
@@ -5537,7 +5537,7 @@
55375537
value returned by subsequent calls to
55385538
\tcode{gcount()}.
55395539
After constructing
5540-
a sentry object, if
5540+
a \tcode{sentry} object, if
55415541
\tcode{rdbuf()}
55425542
is a null pointer, returns \tcode{-1}.
55435543
Otherwise, calls
@@ -5567,7 +5567,7 @@
55675567

55685568
\pnum
55695569
\returns
5570-
After constructing a sentry object, if
5570+
After constructing a \tcode{sentry} object, if
55715571
\tcode{fail() != false},
55725572
returns
55735573
\tcode{pos_type(-1)}
@@ -5590,7 +5590,7 @@
55905590
the number of characters extracted, and it does not affect the value
55915591
returned by subsequent calls to
55925592
\tcode{gcount()}.
5593-
After constructing a sentry object, if
5593+
After constructing a \tcode{sentry} object, if
55945594
\tcode{fail() != true},
55955595
executes
55965596
\tcode{rdbuf()->pubseekpos(pos, ios_base::in)}.
@@ -5615,7 +5615,7 @@
56155615
Behaves as an unformatted input function (as described above), except that the function first clears \tcode{eofbit},
56165616
does not count the number of characters extracted, and
56175617
does not affect the value returned by subsequent calls to \tcode{gcount()}.
5618-
After constructing a sentry object, if
5618+
After constructing a \tcode{sentry} object, if
56195619
\tcode{fail() != true},
56205620
executes
56215621
\tcode{rdbuf()->pubseekoff(off, dir, ios_base::in)}.
@@ -5645,7 +5645,7 @@
56455645
\effects
56465646
Behaves as an unformatted input function\iref{istream.unformatted}, except that it does not count the number of characters extracted and
56475647
does not affect the value returned by subsequent calls to \tcode{is.gcount()}. After
5648-
constructing a sentry object extracts characters as long as the next available
5648+
constructing a \tcode{sentry} object extracts characters as long as the next available
56495649
character \tcode{c} is whitespace or until there are no more characters in the sequence.
56505650
Whitespace characters are distinguished with the same criterion as used by
56515651
\tcode{sentry::sentry}\iref{istream.sentry}.
@@ -6505,7 +6505,7 @@
65056505
\pnum
65066506
\effects
65076507
Behaves as an unformatted output function\iref{ostream.unformatted}.
6508-
After the sentry object is
6508+
After the \tcode{sentry} object is
65096509
constructed, if
65106510
\tcode{sb} is null calls
65116511
\tcode{setstate(badbit)}
@@ -6688,7 +6688,7 @@
66886688
\tcode{(exceptions() \& badbit) != 0}
66896689
then the exception is rethrown.
66906690
In any case, the unformatted output function ends by destroying the
6691-
sentry object, then, if no exception was thrown, returning the value
6691+
\tcode{sentry} object, then, if no exception was thrown, returning the value
66926692
specified for the unformatted output function.
66936693

66946694
\indexlibrarymember{put}{basic_ostream}%
@@ -6700,7 +6700,7 @@
67006700
\pnum
67016701
\effects
67026702
Behaves as an unformatted output function (as described above).
6703-
After constructing a sentry
6703+
After constructing a \tcode{sentry}
67046704
object, inserts
67056705
the character \tcode{c}, if possible.
67066706
\begin{footnote}
@@ -6729,7 +6729,7 @@
67296729
\begin{itemdescr}
67306730
\pnum
67316731
\effects
6732-
Behaves as an unformatted output function (as described above). After constructing a sentry
6732+
Behaves as an unformatted output function (as described above). After constructing a \tcode{sentry}
67336733
object, obtains
67346734
characters to insert from
67356735
successive locations of an array whose first element is designated by
@@ -6769,15 +6769,15 @@
67696769
If
67706770
\tcode{rdbuf()}
67716771
is not a null pointer,
6772-
constructs a sentry object. If that object returns \tcode{true} when converted to a value of type \tcode{bool} the function
6772+
constructs a \tcode{sentry} object. If that object returns \tcode{true} when converted to a value of type \tcode{bool} the function
67736773
calls
67746774
\tcode{rdbuf()->pubsync()}.
67756775
If that function returns $-1$
67766776
calls
67776777
\tcode{setstate(badbit)}
67786778
(which may throw
67796779
\tcode{ios_base::failure}\iref{iostate.flags}).
6780-
Otherwise, if the sentry object returns \tcode{false}, does nothing.
6780+
Otherwise, if the \tcode{sentry} object returns \tcode{false}, does nothing.
67816781

67826782
\pnum
67836783
\returns
@@ -12231,7 +12231,7 @@
1223112231
\pnum
1223212232
\effects
1223312233
Behaves as an unformatted output function\iref{ostream.unformatted}.
12234-
After constructing a sentry object, calls \tcode{sb.emit()}.
12234+
After constructing a \tcode{sentry} object, calls \tcode{sb.emit()}.
1223512235
If that call returns \tcode{false},
1223612236
calls \tcode{setstate(ios_base::badbit)}.
1223712237

0 commit comments

Comments
 (0)