Skip to content

[variant.assign] Introduce bullets for 'If an exception is thrown...'… #1069

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 18, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions source/utilities.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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}%
Expand Down Expand Up @@ -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}%
Expand Down Expand Up @@ -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>(t)}
\begin{itemize}
\item If an exception is thrown during the assignment of \tcode{std::forward<T>(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}
Expand Down