diff --git a/source/utilities.tex b/source/utilities.tex index ba52d664fe..e78e6fccec 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -4016,13 +4016,15 @@ This function shall not participate in overload resolution unless \tcode{is_copy_constructible_v<$T_i$> \&\& is_move_constructible_v<$T_i$> \&\& is_copy_assignable_v<$T_i$>} is \tcode{true} for all $i$. -If an exception is thrown during the call to $T_j$'s copy assignment, +\begin{itemize} +\item If an exception is thrown during the call to $T_j$'s copy assignment, the state of the contained value is as defined by the exception safety guarantee of $T_j$'s copy assignment; \tcode{index()} will be $j$. -If an exception is thrown during the call to $T_j$'s copy construction +\item If an exception is thrown during the call to $T_j$'s copy construction (with $j$ being \tcode{rhs.index()}), \tcode{*this} will remain unchanged. -If an exception is thrown during the call to $T_j$'s move construction, +\item If an exception is thrown during the call to $T_j$'s move construction, the \tcode{variant} will hold no value. +\end{itemize} \end{itemdescr} \indexlibrarymember{operator=}{variant}% @@ -4059,11 +4061,13 @@ \tcode{true} for all $i$. The expression inside \tcode{noexcept} is equivalent to: \tcode{is_nothrow_move_constructible_v<$T_i$> \&\& is_nothrow_move_assignable_v<$T_i$>} for all $i$. -If an exception is thrown during the call to $T_j$'s move construction +\begin{itemize} +\item If an exception is thrown during the call to $T_j$'s move construction (with $j$ being \tcode{rhs.index())}, the \tcode{variant} will hold no value. -If an exception is thrown during the call to $T_j$'s move assignment, +\item If an exception is thrown during the call to $T_j$'s move assignment, the state of the contained value is as defined by the exception safety guarantee of $T_j$'s move assignment; \tcode{index()} will be $j$. +\end{itemize} \end{itemdescr} \indexlibrarymember{operator=}{variant}% @@ -4118,12 +4122,14 @@ \pnum The expression inside \tcode{noexcept} is equivalent to: \tcode{is_nothrow_assignable_v<$T_j$\&, T> \&\& is_nothrow_constructible_v<$T_j$, T>}. -If an exception is thrown during the assignment of \tcode{std::forward(t)} +\begin{itemize} +\item If an exception is thrown during the assignment of \tcode{std::forward(t)} to the value contained in \tcode{*this}, the state of the contained value and \tcode{t} are as defined by the exception safety guarantee of the assignment expression; \tcode{valueless_by_exception()} will be \tcode{false}. -If an exception is thrown during the initialization of the contained value, +\item If an exception is thrown during the initialization of the contained value, the \tcode{variant} object might not hold a value. +\end{itemize} \end{itemdescr} \rSec3[variant.mod]{Modifiers}