Skip to content

Commit a709753

Browse files
authored
Merge branch 'cplusplus:main' into main
2 parents d56c583 + 04d7e61 commit a709753

File tree

7 files changed

+42
-44
lines changed

7 files changed

+42
-44
lines changed

source/algorithms.tex

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5174,7 +5174,7 @@
51745174
into the range \range{result - $N$}{result}
51755175
starting from \tcode{last - 1} and proceeding to \tcode{first}.
51765176
\begin{footnote}
5177-
\tcode{move_backward} can be used instead of move
5177+
\tcode{move_backward} can be used instead of \tcode{move}
51785178
when \tcode{last} is in the range \range{result - $N$}{result}.
51795179
\end{footnote}
51805180
For each positive integer $n \le N$,
@@ -5613,7 +5613,6 @@
56135613
ForwardIterator fill_n(ExecutionPolicy&& exec,
56145614
ForwardIterator first, Size n, const T& value);
56155615

5616-
56175616
template<class T, @\libconcept{output_iterator}@<const T&> O, @\libconcept{sentinel_for}@<O> S>
56185617
constexpr O ranges::fill(O first, S last, const T& value);
56195618
template<class T, @\libconcept{output_range}@<const T&> R>
@@ -7561,13 +7560,12 @@
75617560
\item \tcode{\{i, last\}} for the overloads in namespace \tcode{ranges}.
75627561
\end{itemize}
75637562

7564-
75657563
\pnum
75667564
\complexity
75677565
Let $N$ = \tcode{last - first}:
75687566
\begin{itemize}
75697567
\item
7570-
For the overloads with no \tcode{ExecutionPolicy}, at most $N \log N$ swaps,
7568+
For the overloads with no \tcode{ExecutionPolicy}, at most $N \log_2 N$ swaps,
75717569
but only \bigoh{N} swaps if there is enough extra memory.
75727570
Exactly $N$ applications of the predicate and projection.
75737571
\item
@@ -8232,7 +8230,7 @@
82328230
\range{first2}{last2} contains $n$ elements
82338231
that are equivalent to them,
82348232
the last $\max(m - n, 0)$ elements from \range{first1}{last1}
8235-
is copied to the output range, in order.
8233+
are copied to the output range, in order.
82368234
\end{itemdescr}
82378235

82388236
\rSec3[set.symmetric.difference]{\tcode{set_symmetric_difference}}
@@ -11192,7 +11190,7 @@
1119211190

1119311191
\pnum
1119411192
\begin{note}
11195-
If an exception is thrown, some objects in the range \range{first}{last} are
11193+
If an exception is thrown, some objects in the range \range{ifirst}{ilast} are
1119611194
left in a valid, but unspecified state.
1119711195
\end{note}
1119811196
\end{itemdescr}
@@ -11247,7 +11245,7 @@
1124711245
\pnum
1124811246
\begin{note}
1124911247
If an exception is thrown, some objects in the range
11250-
\countedrange{first}{n}
11248+
\countedrange{ifirst}{n}
1125111249
are left in a valid but unspecified state.
1125211250
\end{note}
1125311251
\end{itemdescr}

source/iostreams.tex

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1458,7 +1458,7 @@
14581458
\tcode{iarray} as necessary to include the element
14591459
\tcode{iarray[idx]}.
14601460
Each newly allocated element of the array is initialized to zero.
1461-
The reference returned is invalid after any other operations on the
1461+
The reference returned is invalid after any other operation on the
14621462
object.
14631463
\begin{footnote}
14641464
An implementation is free to implement both the integer
@@ -1515,7 +1515,7 @@
15151515
\tcode{parray[idx]}.
15161516
Each newly allocated element of the array is initialized to a null
15171517
pointer.
1518-
The reference returned is invalid after any other operations on the
1518+
The reference returned is invalid after any other operation on the
15191519
object.
15201520
However, the value of the storage referred to is retained, so
15211521
that until the next call to
@@ -1636,7 +1636,7 @@
16361636
// \ref{fpos.members}, members
16371637
stateT state() const;
16381638
void state(stateT);
1639-
private;
1639+
private:
16401640
stateT st; // \expos
16411641
};
16421642
}
@@ -1681,7 +1681,7 @@
16811681
\oldconcept{Destructible} (\tref{cpp17.destructible}) requirements.
16821682
If \tcode{is_trivially_copy_constructible_v<stateT>} is \tcode{true},
16831683
then \tcode{fpos<stateT>} has a trivial copy constructor.
1684-
If \tcode{is_trivially_copy_assignable<stateT>} is \tcode{true},
1684+
If \tcode{is_trivially_copy_assignable_v<stateT>} is \tcode{true},
16851685
then \tcode{fpos<stateT>} has a trivial copy assignment operator.
16861686
If \tcode{is_trivially_destructible_v<stateT>} is \tcode{true},
16871687
then \tcode{fpos<stateT>} has a trivial destructor.
@@ -3108,7 +3108,7 @@
31083108
\item
31093109
the
31103110
\tcode{getloc()}
3111-
member to a copy the global locale,
3111+
member to a copy of the global locale,
31123112
\tcode{locale()},
31133113
at the time of construction.
31143114
\end{itemize}

source/locales.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1655,7 +1655,7 @@
16551655
\indextext{UTF-32}%
16561656
The specialization \tcode{codecvt<char16_t, char8_t, mbstate_t>}
16571657
converts between the UTF-16 and UTF-8 encoding forms, and
1658-
the specialization \tcode{codecvt} \tcode{<char32_t, char8_t, mbstate_t>}
1658+
the specialization \tcode{codecvt<char32_t, char8_t, mbstate_t>}
16591659
converts between the UTF-32 and UTF-8 encoding forms.
16601660
\tcode{codecvt<wchar_t, char, mbstate_t>}
16611661
converts between the native character sets for ordinary and wide characters.
@@ -3014,7 +3014,7 @@
30143014
The specializations
30153015
required in \tref{locale.category.facets}\iref{locale.category},
30163016
namely \tcode{collate<char>} and \tcode{collate<wchar_t>},
3017-
apply lexicographic ordering\iref{alg.lex.comparison}.
3017+
apply lexicographical ordering\iref{alg.lex.comparison}.
30183018

30193019
\pnum
30203020
Each function compares a string of characters \tcode{*p}

source/numerics.tex

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3093,7 +3093,7 @@
30933093
void discard(unsigned long long z);
30943094

30953095
// property functions
3096-
const Engine& base() const noexcept { return e; };
3096+
const Engine& base() const noexcept { return e; }
30973097

30983098
// inserters and extractors
30993099
template<class charT, class traits>
@@ -3132,7 +3132,7 @@
31323132
sets \tcode{n} to $0$.
31333133

31343134
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3135-
% independent_bits_engine engine adaptor:
3135+
% independent_bits_engine engine adaptor:\exposid{
31363136

31373137
\rSec3[rand.adapt.ibits]{Class template \tcode{independent_bits_engine}}%
31383138
\indexlibraryglobal{independent_bits_engine}%
@@ -3241,7 +3241,7 @@
32413241
void discard(unsigned long long z);
32423242

32433243
// property functions
3244-
const Engine& base() const noexcept { return e; };
3244+
const Engine& base() const noexcept { return e; }
32453245

32463246
// inserters and extractors
32473247
template<class charT, class traits>
@@ -3343,7 +3343,7 @@
33433343
void discard(unsigned long long z);
33443344

33453345
// property functions
3346-
const Engine& base() const noexcept { return e; };
3346+
const Engine& base() const noexcept { return e; }
33473347

33483348
// inserters and extractors
33493349
template<class charT, class traits>
@@ -7554,7 +7554,7 @@
75547554
\begin{example}
75557555
If the argument has the value $-2$,
75567556
the first two elements of the result will be value-initialized\iref{dcl.init}; the third element of the result will be assigned the value
7557-
of the first element of the argument; etc.
7557+
of the first element of \tcode{*this}; etc.
75587558
\end{example}
75597559
\end{itemdescr}
75607560

source/ranges.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4278,6 +4278,7 @@
42784278
(invoke(f, std::forward<Ts>(elements)), ...);
42794279
}, std::forward<Tuple>(t));
42804280
}
4281+
}
42814282
\end{codeblock}
42824283

42834284
\rSec2[range.all]{All view}
@@ -14288,8 +14289,7 @@
1428814289

1428914290
template<class First, class... Vs>
1429014291
concept @\defexposconcept{cartesian-product-is-common}@ = // \expos
14291-
(@\exposconcept{cartesian-product-common-arg}@<First> && ... &&
14292-
@\exposconcept{cartesian-product-common-arg}@<Vs>);
14292+
@\exposconcept{cartesian-product-common-arg}@<First>;
1429314293

1429414294
template<class... Vs>
1429514295
concept @\defexposconcept{cartesian-product-is-sized}@ = // \expos
@@ -14954,7 +14954,7 @@
1495414954
the logical AND of the following expressions:
1495514955
\begin{itemize}
1495614956
\item
14957-
\tcode{noexcept(ranges::iter_move(std::get<$N$>(i.\exposid{current_}))}
14957+
\tcode{noexcept(ranges::iter_move(std::get<$N$>(i.\exposid{current_})))}
1495814958
for every integer\newline $0 \le N \le \tcode{sizeof...(Vs)}$,
1495914959
\item
1496014960
\tcode{is_nothrow_move_constructible_v<range_rvalue_reference_t<\exposid{maybe-const}<Const, T>>>}\newline

source/time.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2145,7 +2145,7 @@
21452145

21462146
In the list above,
21472147
the use of \tcode{\placeholder{num}} and \tcode{\placeholder{den}}
2148-
refer to the static data members of \tcode{Period::type},
2148+
refers to the static data members of \tcode{Period::type},
21492149
which are converted to arrays of \tcode{charT} using a decimal conversion with no leading zeroes.
21502150

21512151
\pnum
@@ -4681,7 +4681,7 @@
46814681

46824682
\indexlibrarymember{operator-}{year}%
46834683
\begin{itemdecl}
4684-
constexpr year year::operator-() const noexcept;
4684+
constexpr year operator-() const noexcept;
46854685
\end{itemdecl}
46864686

46874687
\begin{itemdescr}

source/utilities.tex

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14265,6 +14265,26 @@
1426514265
% alter its behavior?
1426614266
trailing zeros are not removed from the result.
1426714267

14268+
\pnum
14269+
A zero (\tcode{0}) character
14270+
preceding the \fmtgrammarterm{width} field
14271+
pads the field with leading zeros (following any indication of sign or base)
14272+
to the field width,
14273+
except when applied to an infinity or NaN.
14274+
This option is only valid for
14275+
arithmetic types other than \tcode{charT} and \tcode{bool}
14276+
or when an integer presentation type is specified.
14277+
If the \tcode{0} character and an \fmtgrammarterm{align} option both appear,
14278+
the \tcode{0} character is ignored.
14279+
\begin{example}
14280+
\begin{codeblock}
14281+
char c = 120;
14282+
string s1 = format("{:+06d}", c); // value of \tcode{s1} is \tcode{"+00120"}
14283+
string s2 = format("{:#06x}", 0xa); // value of \tcode{s2} is \tcode{"0x000a"}
14284+
string s3 = format("{:<06}", -42); // value of \tcode{s3} is \tcode{"-42\ \ \ "} (\tcode{0} is ignored because of \tcode{<} alignment)
14285+
\end{codeblock}
14286+
\end{example}
14287+
1426814288
\pnum
1426914289
If \tcode{\{ \opt{\fmtgrammarterm{arg-id}} \}} is used in
1427014290
a \fmtgrammarterm{width} or \fmtgrammarterm{precision},
@@ -14336,26 +14356,6 @@
1433614356
\pnum
1433714357
For a string in a non-Unicode encoding, the width of a string is unspecified.
1433814358

14339-
\pnum
14340-
A zero (\tcode{0}) character
14341-
preceding the \fmtgrammarterm{width} field
14342-
pads the field with leading zeros (following any indication of sign or base)
14343-
to the field width,
14344-
except when applied to an infinity or NaN.
14345-
This option is only valid for
14346-
arithmetic types other than \tcode{charT} and \tcode{bool}
14347-
or when an integer presentation type is specified.
14348-
If the \tcode{0} character and an \fmtgrammarterm{align} option both appear,
14349-
the \tcode{0} character is ignored.
14350-
\begin{example}
14351-
\begin{codeblock}
14352-
char c = 120;
14353-
string s1 = format("{:+06d}", c); // value of \tcode{s1} is \tcode{"+00120"}
14354-
string s2 = format("{:#06x}", 0xa); // value of \tcode{s2} is \tcode{"0x000a"}
14355-
string s3 = format("{:<06}", -42); // value of \tcode{s3} is \tcode{"-42\ \ \ "} (\tcode{0} is ignored because of \tcode{<} alignment)
14356-
\end{codeblock}
14357-
\end{example}
14358-
1435914359
\pnum
1436014360
% FIXME: What if it's an arg-id?
1436114361
The \fmtgrammarterm{nonnegative-integer} in

0 commit comments

Comments
 (0)