Skip to content

Commit a5c2553

Browse files
jensmaurertkoeppe
authored andcommitted
[variant] Move 'Otherwise' to start of following bullet. (#1813)
1 parent 34efb74 commit a5c2553

File tree

1 file changed

+23
-22
lines changed

1 file changed

+23
-22
lines changed

source/utilities.tex

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4171,19 +4171,20 @@
41714171
\effects
41724172
\begin{itemize}
41734173
\item
4174-
If neither \tcode{*this} nor \tcode{rhs} holds a value, there is no effect. Otherwise,
4174+
If neither \tcode{*this} nor \tcode{rhs} holds a value, there is no effect.
41754175
\item
4176-
if \tcode{*this} holds a value but \tcode{rhs} does not, destroys the value
4177-
contained in \tcode{*this} and sets \tcode{*this} to not hold a value. Otherwise,
4176+
Otherwise, if \tcode{*this} holds a value but \tcode{rhs} does not, destroys the value
4177+
contained in \tcode{*this} and sets \tcode{*this} to not hold a value.
41784178
\item
4179-
if \tcode{index() == $j$}, assigns the value contained in \tcode{rhs}
4180-
to the value contained in \tcode{*this}. Otherwise,
4179+
Otherwise, if \tcode{index() == $j$}, assigns the value contained in \tcode{rhs}
4180+
to the value contained in \tcode{*this}.
41814181
\item
4182-
if either \tcode{is_nothrow_copy_constructible_v<$\tcode{T}_j$>} or
4183-
\tcode{!is_nothrow_move_constructible_v<$\tcode{T}_j$>} is \tcode{true},
4184-
equivalent to \tcode{emplace<$j$>(get<$j$>(rhs))}. Otherwise,
4182+
Otherwise, if either \tcode{is_nothrow_copy_constructible_v<$\tcode{T}_j$>}
4183+
is \tcode{true} or
4184+
\tcode{is_nothrow_move_con\-structible_v<$\tcode{T}_j$>} is \tcode{false},
4185+
equivalent to \tcode{emplace<$j$>(get<$j$>(rhs))}.
41854186
\item
4186-
equivalent to \tcode{operator=(variant(rhs))}.
4187+
Otherwise, equivalent to \tcode{operator=(variant(rhs))}.
41874188
\end{itemize}
41884189

41894190
\pnum
@@ -4213,15 +4214,15 @@
42134214
\effects
42144215
\begin{itemize}
42154216
\item
4216-
If neither \tcode{*this} nor \tcode{rhs} holds a value, there is no effect. Otherwise,
4217+
If neither \tcode{*this} nor \tcode{rhs} holds a value, there is no effect.
42174218
\item
4218-
if \tcode{*this} holds a value but \tcode{rhs} does not, destroys the value
4219-
contained in \tcode{*this} and sets \tcode{*this} to not hold a value. Otherwise,
4219+
Otherwise, if \tcode{*this} holds a value but \tcode{rhs} does not, destroys the value
4220+
contained in \tcode{*this} and sets \tcode{*this} to not hold a value.
42204221
\item
4221-
if \tcode{index() == $j$}, assigns \tcode{get<$j$>(std::move(rhs))} to
4222-
the value contained in \tcode{*this}. Otherwise,
4222+
Otherwise, if \tcode{index() == $j$}, assigns \tcode{get<$j$>(std::move(rhs))} to
4223+
the value contained in \tcode{*this}.
42234224
\item
4224-
equivalent to \tcode{emplace<$j$>(get<$j$>(std::move(rhs)))}.
4225+
Otherwise, equivalent to \tcode{emplace<$j$>(get<$j$>(std::move(rhs)))}.
42254226
\end{itemize}
42264227

42274228
\pnum
@@ -4262,13 +4263,13 @@
42624263
\begin{itemize}
42634264
\item
42644265
If \tcode{*this} holds a $\tcode{T}_j$, assigns \tcode{std::forward<T>(t)} to
4265-
the value contained in \tcode{*this}. Otherwise,
4266+
the value contained in \tcode{*this}.
42664267
\item
4267-
if \tcode{is_nothrow_constructible_v<$\tcode{T}_j$, T> ||}
4268+
Otherwise, if \tcode{is_nothrow_constructible_v<$\tcode{T}_j$, T> ||}
42684269
\tcode{!is_nothrow_move_constructible_v<$\tcode{T}_j$>} is \tcode{true},
4269-
equivalent to \tcode{emplace<$j$>(std::forward<T>(t))}. Otherwise,
4270+
equivalent to \tcode{emplace<$j$>(std::forward<T>(t))}.
42704271
\item
4271-
equivalent to \tcode{operator=(variant(std::forward<T>(t)))}.
4272+
Otherwise, equivalent to \tcode{operator=(variant(std::forward<T>(t)))}.
42724273
\end{itemize}
42734274

42744275
\pnum
@@ -4494,11 +4495,11 @@
44944495
\effects
44954496
\begin{itemize}
44964497
\item
4497-
if \tcode{valueless_by_exception() \&\& rhs.valueless_by_exception()} no effect. Otherwise,
4498+
If \tcode{valueless_by_exception() \&\& rhs.valueless_by_exception()} no effect.
44984499
\item
4499-
if \tcode{index() == rhs.index()}, calls \tcode{swap(get<$i$>(*this), get<$i$>(rhs))} where $i$ is \tcode{index()}. Otherwise,
4500+
Otherwise, if \tcode{index() == rhs.index()}, calls \tcode{swap(get<$i$>(*this), get<$i$>(rhs))} where $i$ is \tcode{index()}.
45004501
\item
4501-
exchanges values of \tcode{rhs} and \tcode{*this}.
4502+
Otherwise, exchanges values of \tcode{rhs} and \tcode{*this}.
45024503
\end{itemize}
45034504

45044505
\pnum

0 commit comments

Comments
 (0)