Skip to content

Commit 615306d

Browse files
committed
Fix 'If'
1 parent 0965859 commit 615306d

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

papers/P2988/optional_range_optimization.tex

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
\settocdepth{chapter}
44
\usepackage{minted}
55
\usepackage{fontspec}
6-
\setromanfont{Source Serif Pro}
7-
\setsansfont{Source Sans Pro}
8-
% \setmonofont{Source Code Pro}
96

107
\begin{document}
118
\title{Optimize for std::optional in range adaptors}
@@ -18,10 +15,10 @@
1815

1916
\begin{flushright}
2017
\begin{tabular}{ll}
21-
Document \#: & P3913R0 \\
18+
Document \#: & D3913R1 \\
2219
Date: & \today \\
2320
Project: & Programming Language C++ \\
24-
Audience: & LEWG,LWG
21+
Audience: & LWG
2522
\end{tabular}
2623
\end{flushright}
2724

@@ -41,11 +38,16 @@ \chapter{Motivation}
4138

4239
Add a special case to recognize optional for adaptors:
4340

41+
\begin{itemize}
42+
\item
4443
views::as_const: should return optional or optional<const U\&> (if T is U\&)
44+
\item
4545
views::take(opt, n): empty optional if n is equal to zero, opt otherwise
46+
\item
4647
views::drop(opt, n): empty optional if n greater than zero, opt otherwise
48+
\item
4749
views::reverse: input unchanged
48-
50+
\end{itemize}
4951

5052
\chapter{Design}
5153

@@ -104,7 +106,7 @@ \chapter{Wording}
104106
are indeterminately sequenced.
105107
\begin{addedblock}
106108
\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))}.
108110
\end{addedblock}
109111
\item
110112
Otherwise, if \tcode{T} models
@@ -187,7 +189,7 @@ \chapter{Wording}
187189
are indeterminately sequenced.
188190
\begin{addedblock}
189191
\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()))}.
191193
\end{addedblock}
192194
\item
193195
Otherwise, if \tcode{T} models
@@ -261,9 +263,9 @@ \chapter{Wording}
261263
for some type \tcode{X}, then \tcode{auto(views::empty<const X>)}.
262264
\begin{addedblock}
263265
\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)}.
265267
\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)}.
267269
\end{addedblock}
268270
\item
269271
Otherwise,
@@ -306,7 +308,7 @@ \chapter{Wording}
306308
then \tcode{E.base()}.
307309
\begin{addedblock}
308310
\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).
310312
\end{addedblock}
311313
\item
312314
Otherwise, if the type of \tcode{E} is \cv{} \tcode{subrange<reverse_iterator<I>, reverse_iterator<I>, K>}

0 commit comments

Comments
 (0)