Skip to content

Commit fe3f46b

Browse files
Quuxplusonetkoeppe
authored andcommitted
Harmonize phrasings of "this destructor is trivial". (#2191)
Inspired by P0602 https://lichray.github.io/trivially_variant.html Zhihao suggested that we harmonize "trivially destructible" wording across the rest of the Standard.
1 parent 14809d0 commit fe3f46b

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

source/iterators.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2660,7 +2660,7 @@
26602660
\effects
26612661
The iterator is destroyed.
26622662
If \tcode{is_trivially_destructible_v<T>} is \tcode{true},
2663-
then this destructor is a trivial destructor.
2663+
then this destructor is trivial.
26642664
\end{itemdescr}
26652665

26662666
\rSec3[istream.iterator.ops]{\tcode{istream_iterator} operations}

source/utilities.tex

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -517,9 +517,10 @@
517517
be a constexpr function if and only if all required element-wise
518518
initializations for copy and move, respectively, would satisfy the
519519
requirements for a constexpr function.
520-
The destructor of \tcode{pair} shall be a trivial destructor if
521-
\tcode{(is_trivially_destructible_v<T1> \&\& is_trivially_destructible_v<T2>)}
522-
is \tcode{true}.
520+
521+
\pnum
522+
If \tcode{(is_trivially_destructible_v<T1> \&\& is_trivially_destructible_v<T2>)}
523+
is \tcode{true}, then the destructor of \tcode{pair} is trivial.
523524

524525
\indexlibrary{\idxcode{pair}!constructor}%
525526
\begin{itemdecl}
@@ -1161,6 +1162,13 @@
11611162

11621163
\rSec3[tuple.cnstr]{Construction}
11631164

1165+
\pnum
1166+
In the descriptions that follow, let $i$ be in the range
1167+
\range{0}{sizeof...(Types)} in order, $\tcode{T}_i$
1168+
be the $i^\text{th}$ type in \tcode{Types}, and
1169+
$\tcode{U}_i$ be the $i^\text{th}$ type in a template parameter pack named \tcode{UTypes}, where indexing
1170+
is zero-based.
1171+
11641172
\pnum
11651173
For each \tcode{tuple} constructor, an exception is thrown only if the construction of
11661174
one of the types in \tcode{Types} throws an exception.
@@ -1174,16 +1182,8 @@
11741182
constexpr functions.
11751183

11761184
\pnum
1177-
The destructor of \tcode{tuple} shall be a trivial destructor if
1178-
\tcode{(is_trivially_destructible_v<Types> \&\& ...)}
1179-
is \tcode{true}.
1180-
1181-
\pnum
1182-
In the constructor descriptions that follow, let $i$ be in the range
1183-
\range{0}{sizeof...(Types)} in order, $\tcode{T}_i$
1184-
be the $i^\text{th}$ type in \tcode{Types}, and
1185-
$\tcode{U}_i$ be the $i^\text{th}$ type in a template parameter pack named \tcode{UTypes}, where indexing
1186-
is zero-based.
1185+
If \tcode{is_trivially_destructible_v<$\tcode{T}_i$>} is \tcode{true} for all $\tcode{T}_i$,
1186+
then the destructor of \tcode{tuple} is trivial.
11871187

11881188
\indexlibrary{\idxcode{tuple}!constructor}%
11891189
\begin{itemdecl}
@@ -2544,7 +2544,7 @@
25442544

25452545
\pnum
25462546
\remarks
2547-
If \tcode{is_trivially_destructible_v<T> == true} then this destructor shall be a trivial destructor.
2547+
If \tcode{is_trivially_destructible_v<T>} is \tcode{true}, then this destructor is trivial.
25482548
\end{itemdescr}
25492549

25502550
\rSec3[optional.assign]{Assignment}
@@ -4162,8 +4162,8 @@
41624162

41634163
\pnum
41644164
\remarks
4165-
If \tcode{is_trivially_destructible_v<$\tcode{T}_i$> == true} for all $\tcode{T}_i$
4166-
then this destructor shall be a trivial destructor.
4165+
If \tcode{is_trivially_destructible_v<$\tcode{T}_i$>} is \tcode{true} for all $\tcode{T}_i$,
4166+
then this destructor is trivial.
41674167
\end{itemdescr}
41684168

41694169
\rSec3[variant.assign]{Assignment}

0 commit comments

Comments
 (0)