Skip to content

Commit 7810140

Browse files
jensmaurertkoeppe
authored andcommitted
[variant.assign] Introduce bullets for 'If an exception is thrown...' phrases. (#1069)
Fixes #822.
1 parent 2e87ec7 commit 7810140

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

source/utilities.tex

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4019,13 +4019,15 @@
40194019
This function shall not participate in overload resolution unless
40204020
\tcode{is_copy_constructible_v<$T_i$> \&\& is_move_constructible_v<$T_i$> \&\& is_copy_assignable_v<$T_i$>}
40214021
is \tcode{true} for all $i$.
4022-
If an exception is thrown during the call to $T_j$'s copy assignment,
4022+
\begin{itemize}
4023+
\item If an exception is thrown during the call to $T_j$'s copy assignment,
40234024
the state of the contained value is as defined by the exception safety
40244025
guarantee of $T_j$'s copy assignment; \tcode{index()} will be $j$.
4025-
If an exception is thrown during the call to $T_j$'s copy construction
4026+
\item If an exception is thrown during the call to $T_j$'s copy construction
40264027
(with $j$ being \tcode{rhs.index()}), \tcode{*this} will remain unchanged.
4027-
If an exception is thrown during the call to $T_j$'s move construction,
4028+
\item If an exception is thrown during the call to $T_j$'s move construction,
40284029
the \tcode{variant} will hold no value.
4030+
\end{itemize}
40294031
\end{itemdescr}
40304032

40314033
\indexlibrarymember{operator=}{variant}%
@@ -4062,11 +4064,13 @@
40624064
\tcode{true} for all $i$.
40634065
The expression inside \tcode{noexcept} is equivalent to:
40644066
\tcode{is_nothrow_move_constructible_v<$T_i$> \&\& is_nothrow_move_assignable_v<$T_i$>} for all $i$.
4065-
If an exception is thrown during the call to $T_j$'s move construction
4067+
\begin{itemize}
4068+
\item If an exception is thrown during the call to $T_j$'s move construction
40664069
(with $j$ being \tcode{rhs.index())}, the \tcode{variant} will hold no value.
4067-
If an exception is thrown during the call to $T_j$'s move assignment,
4070+
\item If an exception is thrown during the call to $T_j$'s move assignment,
40684071
the state of the contained value is as defined by the exception safety
40694072
guarantee of $T_j$'s move assignment; \tcode{index()} will be $j$.
4073+
\end{itemize}
40704074
\end{itemdescr}
40714075

40724076
\indexlibrarymember{operator=}{variant}%
@@ -4121,12 +4125,14 @@
41214125
\pnum
41224126
The expression inside \tcode{noexcept} is equivalent to:
41234127
\tcode{is_nothrow_assignable_v<$T_j$\&, T> \&\& is_nothrow_constructible_v<$T_j$, T>}.
4124-
If an exception is thrown during the assignment of \tcode{std::forward<T>(t)}
4128+
\begin{itemize}
4129+
\item If an exception is thrown during the assignment of \tcode{std::forward<T>(t)}
41254130
to the value contained in \tcode{*this}, the state of the contained value and
41264131
\tcode{t} are as defined by the exception safety guarantee of the assignment
41274132
expression; \tcode{valueless_by_exception()} will be \tcode{false}.
4128-
If an exception is thrown during the initialization of the contained value,
4133+
\item If an exception is thrown during the initialization of the contained value,
41294134
the \tcode{variant} object might not hold a value.
4135+
\end{itemize}
41304136
\end{itemdescr}
41314137

41324138
\rSec3[variant.mod]{Modifiers}

0 commit comments

Comments
 (0)