Skip to content

Commit a5621c6

Browse files
jensmaurertkoeppe
authored andcommitted
[lib] Canonicalize order of library descriptive elements
1 parent b874420 commit a5621c6

File tree

5 files changed

+105
-104
lines changed

5 files changed

+105
-104
lines changed

source/iostreams.tex

+65-64
Original file line numberDiff line numberDiff line change
@@ -3754,27 +3754,6 @@
37543754
\end{itemdecl}
37553755

37563756
\begin{itemdescr}
3757-
\pnum
3758-
\returns
3759-
\tcode{traits::to_int_type(c)},
3760-
where \tcode{c} is the first
3761-
\textit{character}
3762-
of the
3763-
\term{pending sequence},
3764-
without moving the input sequence position past it.
3765-
If the pending sequence is null then the function returns
3766-
\tcode{traits::eof()}
3767-
to indicate failure.
3768-
3769-
\pnum
3770-
\remarks
3771-
The public members of
3772-
\tcode{basic_streambuf}
3773-
call this virtual function only if
3774-
\tcode{gptr()}
3775-
is null or
3776-
\tcode{gptr() >= egptr()}.
3777-
37783757
\pnum
37793758
The
37803759
\term{pending sequence}
@@ -3840,10 +3819,31 @@
38403819
agree with the backup sequence (where \tcode{n} is the length of the backup sequence).
38413820
\end{itemize}
38423821

3822+
\pnum
3823+
\returns
3824+
\tcode{traits::to_int_type(c)},
3825+
where \tcode{c} is the first
3826+
\textit{character}
3827+
of the
3828+
\term{pending sequence},
3829+
without moving the input sequence position past it.
3830+
If the pending sequence is null then the function returns
3831+
\tcode{traits::eof()}
3832+
to indicate failure.
3833+
38433834
\pnum
38443835
\default
38453836
Returns
38463837
\tcode{traits::eof()}.
3838+
3839+
\pnum
3840+
\remarks
3841+
The public members of
3842+
\tcode{basic_streambuf}
3843+
call this virtual function only if
3844+
\tcode{gptr()}
3845+
is null or
3846+
\tcode{gptr() >= egptr()}.
38473847
\end{itemdescr}
38483848

38493849
\indexlibrarymember{uflow}{basic_streambuf}%
@@ -3888,19 +3888,6 @@
38883888

38893889
\begin{itemdescr}
38903890
\pnum
3891-
\remarks
3892-
The public functions of
3893-
\tcode{basic_streambuf}
3894-
call this virtual function only when
3895-
\tcode{gptr()}
3896-
is null,
3897-
\tcode{gptr() == eback()},
3898-
or
3899-
\tcode{traits::eq(traits::to_char_type(c), gptr()[-1])}
3900-
returns
3901-
\tcode{false}.
3902-
Other calls shall also satisfy that constraint.
3903-
39043891
The
39053892
\term{pending sequence}
39063893
is defined as for
@@ -3920,6 +3907,16 @@
39203907
Whether the input sequence is backed up or modified in any other way is unspecified.
39213908
\end{itemize}
39223909

3910+
\pnum
3911+
\ensures
3912+
On return, the constraints of
3913+
\tcode{gptr()},
3914+
\tcode{eback()},
3915+
and
3916+
\tcode{pptr()}
3917+
are the same as for
3918+
\tcode{underflow()}.
3919+
39233920
\pnum
39243921
\returns
39253922
\tcode{traits::eof()}
@@ -3934,20 +3931,24 @@
39343931
\tcode{traits::eof()}
39353932
to indicate success.
39363933

3937-
\pnum
3938-
\ensures
3939-
On return, the constraints of
3940-
\tcode{gptr()},
3941-
\tcode{eback()},
3942-
and
3943-
\tcode{pptr()}
3944-
are the same as for
3945-
\tcode{underflow()}.
3946-
39473934
\pnum
39483935
\default
39493936
Returns
39503937
\tcode{traits::eof()}.
3938+
3939+
\pnum
3940+
\remarks
3941+
The public functions of
3942+
\tcode{basic_streambuf}
3943+
call this virtual function only when
3944+
\tcode{gptr()}
3945+
is null,
3946+
\tcode{gptr() == eback()},
3947+
or
3948+
\tcode{traits::eq(traits::to_char_type(c), gptr()[-1])}
3949+
returns
3950+
\tcode{false}.
3951+
Other calls shall also satisfy that constraint.
39513952
\end{itemdescr}
39523953

39533954
\rSec4[streambuf.virt.put]{Put area}
@@ -4002,16 +4003,6 @@
40024003
\tcode{true}, otherwise the sequence consisting of \tcode{c}.
40034004
\end{itemize}
40044005

4005-
\pnum
4006-
\remarks
4007-
The member functions
4008-
\tcode{sputc()}
4009-
and
4010-
\tcode{sputn()}
4011-
call this function in case that
4012-
no room can be found in the put buffer enough to accommodate the
4013-
argument character sequence.
4014-
40154006
\pnum
40164007
\expects
40174008
Every overriding definition of this virtual function
@@ -4088,6 +4079,16 @@
40884079
\default
40894080
Returns
40904081
\tcode{traits::eof()}.
4082+
4083+
\pnum
4084+
\remarks
4085+
The member functions
4086+
\tcode{sputc()}
4087+
and
4088+
\tcode{sputn()}
4089+
call this function in case that
4090+
no room can be found in the put buffer enough to accommodate the
4091+
argument character sequence.
40914092
\end{itemdescr}
40924093

40934094
\rSec1[iostream.format]{Formatting and manipulators}
@@ -11083,6 +11084,16 @@
1108311084
if and only if a call was made to \tcode{sync()}
1108411085
since the most recent call to \tcode{emit()}, if any.
1108511086

11087+
\pnum
11088+
\sync
11089+
All \tcode{emit()} calls transferring characters
11090+
to the same stream buffer object
11091+
appear to execute in a total order
11092+
consistent with the ``happens before'' relation\iref{intro.races},
11093+
where each \tcode{emit()} call
11094+
synchronizes with
11095+
subsequent \tcode{emit()} calls in that total order.
11096+
1108611097
\pnum
1108711098
\ensures
1108811099
On success, the associated output is empty.
@@ -11097,16 +11108,6 @@
1109711108
\item The call to \tcode{wrapped->pubsync()} (if any) succeeded.
1109811109
\end{itemize}
1109911110

11100-
\pnum
11101-
\sync
11102-
All \tcode{emit()} calls transferring characters
11103-
to the same stream buffer object
11104-
appear to execute in a total order
11105-
consistent with the ``happens before'' relation\iref{intro.races},
11106-
where each \tcode{emit()} call
11107-
synchronizes with
11108-
subsequent \tcode{emit()} calls in that total order.
11109-
1111011111
\pnum
1111111112
\remarks
1111211113
May call member functions of \tcode{wrapped}

source/locales.tex

+10-10
Original file line numberDiff line numberDiff line change
@@ -1829,16 +1829,6 @@
18291829
set \tcode{from_next == from} and \tcode{to_next != to}.
18301830
\end{note}
18311831

1832-
\pnum
1833-
\remarks
1834-
Its operations on \tcode{state} are unspecified.
1835-
\begin{note}
1836-
This argument can be used, for example,
1837-
to maintain shift state,
1838-
to specify conversion options (such as count only), or
1839-
to identify a cache of seek offsets.
1840-
\end{note}
1841-
18421832
\pnum
18431833
\returns
18441834
An enumeration value, as summarized in \tref{locale.codecvt.inout}.
@@ -1864,6 +1854,16 @@
18641854
all the available destination elements, or
18651855
that additional source elements are needed
18661856
before another destination element can be produced.
1857+
1858+
\pnum
1859+
\remarks
1860+
Its operations on \tcode{state} are unspecified.
1861+
\begin{note}
1862+
This argument can be used, for example,
1863+
to maintain shift state,
1864+
to specify conversion options (such as count only), or
1865+
to identify a cache of seek offsets.
1866+
\end{note}
18671867
\end{itemdescr}
18681868

18691869
\indexlibrarymember{codecvt}{do_unshift}%

source/numerics.tex

+18-18
Original file line numberDiff line numberDiff line change
@@ -4340,24 +4340,6 @@
43404340
\end{itemdecl}
43414341

43424342
\begin{itemdescr}
4343-
\pnum
4344-
\complexity
4345-
Exactly
4346-
$k = \max(1, \left\lceil b / \log_2 R \right\rceil)$
4347-
invocations
4348-
of \tcode{g},
4349-
where $b$
4350-
\begin{footnote}
4351-
$b$ is introduced
4352-
to avoid any attempt
4353-
to produce more bits of randomness
4354-
than can be held in \tcode{RealType}.
4355-
\end{footnote}
4356-
is the lesser of \tcode{numeric_limits<RealType>::digits}
4357-
and \tcode{bits},
4358-
and
4359-
$R$ is the value of $\tcode{g.max()} - \tcode{g.min()} + 1$.
4360-
43614343
\pnum
43624344
\effects
43634345
Invokes \tcode{g()} $k$ times
@@ -4381,6 +4363,24 @@
43814363
\throws
43824364
What and when \tcode{g} throws.
43834365

4366+
\pnum
4367+
\complexity
4368+
Exactly
4369+
$k = \max(1, \left\lceil b / \log_2 R \right\rceil)$
4370+
invocations
4371+
of \tcode{g},
4372+
where $b$
4373+
\begin{footnote}
4374+
$b$ is introduced
4375+
to avoid any attempt
4376+
to produce more bits of randomness
4377+
than can be held in \tcode{RealType}.
4378+
\end{footnote}
4379+
is the lesser of \tcode{numeric_limits<RealType>::digits}
4380+
and \tcode{bits},
4381+
and
4382+
$R$ is the value of $\tcode{g.max()} - \tcode{g.min()} + 1$.
4383+
43844384
\pnum
43854385
\begin{note}
43864386
If the values $g_i$ produced by \tcode{g} are uniformly distributed,

source/regex.tex

+4-4
Original file line numberDiff line numberDiff line change
@@ -1538,10 +1538,6 @@
15381538
\end{itemdecl}
15391539

15401540
\begin{itemdescr}
1541-
\pnum
1542-
\returns
1543-
\tcode{*this}.
1544-
15451541
\pnum
15461542
\effects
15471543
Assigns the regular expression contained in the string
@@ -1554,6 +1550,10 @@
15541550
\tcode{flags()} returns \tcode{f} and \tcode{mark_count()}
15551551
returns the number of marked sub-expressions within the expression.
15561552

1553+
\pnum
1554+
\returns
1555+
\tcode{*this}.
1556+
15571557
\pnum
15581558
\throws
15591559
\tcode{regex_error} if \tcode{s} is not a valid regular expression.

source/utilities.tex

+8-8
Original file line numberDiff line numberDiff line change
@@ -9892,10 +9892,6 @@
98929892
\end{itemdecl}
98939893

98949894
\begin{itemdescr}
9895-
\pnum
9896-
\mandates
9897-
\tcode{Y} is a complete type.
9898-
98999895
\pnum
99009896
\constraints
99019897
When \tcode{T} is an array type,
@@ -9906,6 +9902,10 @@
99069902
the expression \tcode{delete p} is well-formed and
99079903
\tcode{Y*} is convertible to \tcode{T*}.
99089904

9905+
\pnum
9906+
\mandates
9907+
\tcode{Y} is a complete type.
9908+
99099909
\pnum
99109910
\expects
99119911
The expression
@@ -10363,16 +10363,16 @@
1036310363
\end{itemdecl}
1036410364

1036510365
\begin{itemdescr}
10366+
\pnum
10367+
\sync
10368+
None.
10369+
1036610370
\pnum
1036710371
\returns
1036810372
The number of \tcode{shared_ptr} objects, \tcode{*this} included,
1036910373
that share ownership with \tcode{*this}, or \tcode{0} when \tcode{*this} is
1037010374
empty.
1037110375

10372-
\pnum
10373-
\sync
10374-
None.
10375-
1037610376
\pnum
1037710377
\begin{note}
1037810378
\tcode{get() == nullptr}

0 commit comments

Comments
 (0)