You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: papers/P2988/optional_range_optimization.tex
+13-11Lines changed: 13 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -3,9 +3,6 @@
3
3
\settocdepth{chapter}
4
4
\usepackage{minted}
5
5
\usepackage{fontspec}
6
-
\setromanfont{Source Serif Pro}
7
-
\setsansfont{Source Sans Pro}
8
-
% \setmonofont{Source Code Pro}
9
6
10
7
\begin{document}
11
8
\title{Optimize for std::optional in range adaptors}
@@ -18,10 +15,10 @@
18
15
19
16
\begin{flushright}
20
17
\begin{tabular}{ll}
21
-
Document \#: & P3913R0 \\
18
+
Document \#: & D3913R1 \\
22
19
Date: & \today \\
23
20
Project: & Programming Language C++ \\
24
-
Audience: & LEWG,LWG
21
+
Audience: & LWG
25
22
\end{tabular}
26
23
\end{flushright}
27
24
@@ -41,11 +38,16 @@ \chapter{Motivation}
41
38
42
39
Add a special case to recognize optional for adaptors:
43
40
41
+
\begin{itemize}
42
+
\item
44
43
views::as_const: should return optional or optional<const U\&> (if T is U\&)
44
+
\item
45
45
views::take(opt, n): empty optional if n is equal to zero, opt otherwise
46
+
\item
46
47
views::drop(opt, n): empty optional if n greater than zero, opt otherwise
48
+
\item
47
49
views::reverse: input unchanged
48
-
50
+
\end{itemize}
49
51
50
52
\chapter{Design}
51
53
@@ -104,7 +106,7 @@ \chapter{Wording}
104
106
are indeterminately sequenced.
105
107
\begin{addedblock}
106
108
\item
107
-
Otherwise, If\tcode{T} is specialization of \tcode{optional}, then \tcode{(F == D(0) ? ((void)E, T()) : \placeholdernc{decay-copy}(E))}
109
+
Otherwise, if\tcode{T} is specialization of \tcode{optional}, then \tcode{(static_cast<D>(F) == D() ? ((void)E, T()) : \placeholdernc{decay-copy}(E))}.
108
110
\end{addedblock}
109
111
\item
110
112
Otherwise, if \tcode{T} models
@@ -187,7 +189,7 @@ \chapter{Wording}
187
189
are indeterminately sequenced.
188
190
\begin{addedblock}
189
191
\item
190
-
Otherwise, If\tcode{T} is specialization of \tcode{optional}, then \tcode{(F == D(0) ? \placeholdernc{decay-copy}(E) : ((void)E, T()))}
192
+
Otherwise, if\tcode{T} is specialization of \tcode{optional}, then \tcode{(static_cast<D>(F) == D() ? \placeholdernc{decay-copy}(E) : ((void)E, T()))}.
191
193
\end{addedblock}
192
194
\item
193
195
Otherwise, if \tcode{T} models
@@ -261,9 +263,9 @@ \chapter{Wording}
261
263
for some type \tcode{X}, then \tcode{auto(views::empty<const X>)}.
262
264
\begin{addedblock}
263
265
\item
264
-
Otherwise, if \tcode{U} denotes \tcode{optional<X\&>} for some type \tcode{X} , then \tcode{optional<const X\&>(E)}
266
+
Otherwise, if \tcode{U} denotes \tcode{optional<X\&>} for some type \tcode{X} , then \tcode{optional<const X\&>(E)}.
265
267
\item
266
-
Otherwise, if \tcode{U} denotes \tcode{optional<X>} for some type \tcode{X} , then \tcode{optional<const X>(E)}
268
+
Otherwise, if \tcode{U} denotes \tcode{optional<X>} for some type \tcode{X} , then \tcode{optional<const X>(E)}.
267
269
\end{addedblock}
268
270
\item
269
271
Otherwise,
@@ -306,7 +308,7 @@ \chapter{Wording}
306
308
then \tcode{E.base()}.
307
309
\begin{addedblock}
308
310
\item
309
-
Otherwise, If\tcode{T} is specialization of \tcode{optional}, then \placeholdernc{decay-copy}(E).
311
+
Otherwise, if\tcode{T} is specialization of \tcode{optional}, then \placeholdernc{decay-copy}(E).
310
312
\end{addedblock}
311
313
\item
312
314
Otherwise, if the type of \tcode{E} is \cv{} \tcode{subrange<reverse_iterator<I>, reverse_iterator<I>, K>}
0 commit comments