Skip to content

Commit 41ac3b7

Browse files
committed
Update verbiage around wording
1 parent 28588cf commit 41ac3b7

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

papers/P2988/optional_ref_wording.tex

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
\begin{flushright}
2020
\begin{tabular}{ll}
21-
Document \#: & P2988R8 \\
21+
Document \#: & P2988R9 \\
2222
Date: & \today \\
2323
Project: & Programming Language C++ \\
2424
Audience: & LEWG
@@ -36,6 +36,10 @@
3636
\chapter*{Changes Since Last Version}
3737

3838
\begin{itemize}
39+
\item \textbf{Changes since R8}
40+
\begin{itemize}
41+
\item Fix move/assign optional<U\&> allowing stealing of referenced U
42+
\end{itemize}
3943
\item \textbf{Changes since R7}
4044
\begin{itemize}
4145
\item Wording mandates/constraint fixes
@@ -384,6 +388,9 @@ \section{Assignment of optional<T\&>}
384388

385389
This observation allows us to provide only copy-assignment for \tcode{optional<T\&>}, instead of a set of converting assignments, that would need to replicate the signatures of constructors and their constraints. Assignment from any other value is handled by first implicitly constructing \tcode{optional<T\&>} and then using copy-assignment. Move-assignment is the same as copy-assignment, since only pointer copy is involved.
386390

391+
\section{Copy and Assignment of optional<U\&>\&\& to optional<T>}
392+
Care must be take to prevent the assignment of a movable optional to disallow the copy or assignment of the underlying referred to value to be stolen. The \tcode{optional<U\&> const\&} assignment or copy constructor should be used instead. We thank Jan Kokemüller for uncovering this bug.
393+
387394

388395
\chapter{Proposal}
389396

@@ -406,6 +413,10 @@ \chapter{Impact on the standard}
406413

407414
The proposed changes are relative to the current working draft \cite{N4910}.
408415

416+
\chapter{Acknowledgements}
417+
Many thanks to all of the reviewers and authors of beman/optional26, \cite{The_Beman_Project_beman_optional26}, in particular A. Jiang, Darius Neațu, David Sankel, Eddie Nolan, Jan Kokemüller, Jeff Garland, and River. Tomasz Kamiński provided extensive support for the library wording of optional<T\&>.
418+
419+
409420
\chapter*{Document history}
410421

411422
\begin{itemize}

0 commit comments

Comments
 (0)