@@ -53,7 +53,8 @@ \section{Syntax}
5353 \end {lstlisting }
5454\end {frame }
5555
56- \begin {frame }[fragile]{A: \texttt {444 }}
56+ % REMOVE_FOR_PRINT {
57+ \begin {frame }[fragile,noframenumbering]{A: \texttt {444 }}
5758 \ begin{lstlisting} [language=python]
5859#!/usr/bin/env python3
5960
@@ -66,6 +67,7 @@ \section{Syntax}
6667
6768 \hfill \textbf {Why? } \only <2>{implicit capture by reference}
6869\end {frame }
70+ % REMOVE_FOR_PRINT }
6971
7072\begin {frame }[fragile]{Fix}
7173 \ begin{lstlisting} [language=python]
@@ -88,24 +90,30 @@ \section{Syntax}
8890\begin {frame }[fragile]{Q: What is the output of the program?}
8991 \inputcpplisting {snippet34a}
9092
93+ % REMOVE_FOR_PRINT {
9194 \only <2>{\textbf {\textcolor {vertexDarkRed}{error:} } \enquote {k} is not captured}
95+ % REMOVE_FOR_PRINT }
9296\end {frame }
9397
9498\begin {frame }[fragile]{Q: What is the output of the program?}
9599 \inputcpplisting {snippet34b}
96100\end {frame }
97101
98- \begin {frame }[fragile]{A: \text {234}}
102+ % REMOVE_FOR_PRINT {
103+ \begin {frame }[fragile,noframenumbering]{A: \text {234}}
99104 \inputcpplisting {snippet34b}
100105\end {frame }
106+ % REMOVE_FOR_PRINT }
101107
102108\begin {frame }[fragile]{Q: What is the output of the program?}
103109 \inputcpplisting {snippet34c}
104110\end {frame }
105111
106- \begin {frame }[fragile]{A: \texttt {555 } (not \texttt {444 })}
112+ % REMOVE_FOR_PRINT {
113+ \begin {frame }[fragile,noframenumbering]{A: \texttt {555 } (not \texttt {444 })}
107114 \inputcpplisting {snippet34c}
108115\end {frame }
116+ % REMOVE_FOR_PRINT }
109117
110118\begin {frame }[fragile]{\texttt {C++ }'s Lambda Expression}
111119 \textbf {Capturing rules }
@@ -146,32 +154,40 @@ \section{Syntax}
146154\begin {frame }[fragile]{Q: What is the output of the program?}
147155 \inputcpplisting {snippet9a}
148156
157+ % REMOVE_FOR_PRINT {
149158 \only <2>{\textbf {\textcolor {vertexDarkRed}{error:} } cannot assign to a variable captured by copy in a non-mutable lambda}
159+ % REMOVE_FOR_PRINT }
150160\end {frame }
151161
152162\begin {frame }[fragile]{Q: What is the output of the program?}
153163 \inputcpplisting {snippet9b}
154164\end {frame }
155165
156- \begin {frame }[fragile]{A: \texttt {121 }}
166+ % REMOVE_FOR_PRINT {
167+ \begin {frame }[fragile,noframenumbering]{A: \texttt {121 }}
157168 \inputcpplisting {snippet9b}
158169\end {frame }
170+ % REMOVE_FOR_PRINT }
159171
160172\begin {frame }[fragile]{Q: What is the output of the program?}
161173 \inputcpplisting {snippet9c}
162174\end {frame }
163175
164- \begin {frame }[fragile]{A: \texttt {122 }}
176+ % REMOVE_FOR_PRINT {
177+ \begin {frame }[fragile,noframenumbering]{A: \texttt {122 }}
165178 \inputcpplisting {snippet9c}
166179\end {frame }
180+ % REMOVE_FOR_PRINT }
167181
168182\begin {frame }[fragile]{Q: What is the output of the program?}
169183 \inputcpplisting {snippet9d}
170184\end {frame }
171185
172- \begin {frame }[fragile]{A: \texttt {12 }}
186+ % REMOVE_FOR_PRINT {
187+ \begin {frame }[fragile,noframenumbering]{A: \texttt {12 }}
173188 \inputcpplisting {snippet9d}
174189\end {frame }
190+ % REMOVE_FOR_PRINT }
175191
176192\begin {frame }[fragile]{Q: What is the output of the program?}
177193 \inputcpplisting {snippet10}
@@ -181,13 +197,15 @@ \section{Syntax}
181197 \end {center }
182198\end {frame }
183199
184- \begin {frame }[fragile]{A: \texttt {11235 }}
200+ % REMOVE_FOR_PRINT {
201+ \begin {frame }[fragile,noframenumbering]{A: \texttt {11235 }}
185202 \inputcpplisting {snippet10}
186203
187204 \begin {center }
188205 (\href {https://en.cppreference.com/w/cpp/utility/exchange}{\texttt {cppreference.com/w/cpp/utility/exchange }})
189206 \end {center }
190207\end {frame }
208+ % REMOVE_FOR_PRINT }
191209
192210\begin {frame }{\texttt {C++ }'s Lambda Expression}
193211 Remember, lambda expressions are pure syntactic sugar and are equivalent to \texttt {struct }s with an appropriate \texttt {operator()() } overload \ldots
@@ -197,22 +215,28 @@ \section{Syntax}
197215 \inputcpplisting {snippet11}
198216\end {frame }
199217
200- \begin {frame }[fragile]{A: \texttt {11 }}
218+ % REMOVE_FOR_PRINT {
219+ \begin {frame }[fragile,noframenumbering]{A: \texttt {11 }}
201220 \inputcpplisting {snippet11}
202221\end {frame }
222+ % REMOVE_FOR_PRINT }
203223
204224\begin {frame }[fragile]{Q: What is the output of the program?}
205225 \inputcpplisting {snippet12}
206226\end {frame }
207227
208- \begin {frame }[fragile]{A: \texttt {66 }}
228+ % REMOVE_FOR_PRINT {
229+ \begin {frame }[fragile,noframenumbering]{A: \texttt {66 }}
209230 \inputcpplisting {snippet12}
210231\end {frame }
232+ % REMOVE_FOR_PRINT }
211233
212234\begin {frame }[fragile]{Q: What is the output of the program?}
213235 \inputcpplisting {snippet13}
214236
237+ % REMOVE_FOR_PRINT {
215238 \only <2>{\textbf {\textcolor {vertexDarkRed}{error:} } call to implicitly-deleted copy ctor}
239+ % REMOVE_FOR_PRINT }
216240\end {frame }
217241
218242\begin {frame }[plain,noframenumbering]
@@ -226,21 +250,25 @@ \section{Stateful Lambdas}
226250 \inputcpplisting {snippet14}
227251\end {frame }
228252
229- \begin {frame }[fragile]{A: \texttt {3 }}
253+ % REMOVE_FOR_PRINT {
254+ \begin {frame }[fragile,noframenumbering]{A: \texttt {3 }}
230255 \inputcpplisting {snippet14}
231256\end {frame }
257+ % REMOVE_FOR_PRINT }
232258
233259\begin {frame }[fragile]{Q: What is the output of the program?}
234260 \inputcpplisting {snippet15}
235261\end {frame }
236262
237- \begin {frame }[fragile]{A: \texttt {5 }}
263+ % REMOVE_FOR_PRINT {
264+ \begin {frame }[fragile,noframenumbering]{A: \texttt {5 }}
238265 \inputcpplisting {snippet15}
239266
240267 \begin {center }
241268 ($ ^*$ undefined in a threaded context, since \texttt {static } is not thread-safe!)
242269 \end {center }
243270\end {frame }
271+ % REMOVE_FOR_PRINT }
244272
245273\begin {frame }[fragile]{Stateful Lambdas}
246274 \textbf {Fibonacci (again) }:
@@ -338,9 +366,14 @@ \section{Best Practices}
338366 \end {lstlisting }
339367 \hfill \ldots given a sufficient implementation of \texttt {filters }
340368
341- \only <2>{\scalebox {1.2}{\textbf {No! Horrible code! }}
342-
343- Capturing only applies to non-\texttt {static } local variables. Why does this work?}
369+ % REMOVE_FOR_PRINT {
370+ \only <2>{%
371+ % REMOVE_FOR_PRINT }
372+ \scalebox {1.2}{\textbf {No! Horrible code! }}
373+ Capturing only applies to non-\texttt {static } local variables. Why does this work?
374+ % REMOVE_FOR_PRINT {
375+ }
376+ % REMOVE_FOR_PRINT }
344377\end {frame }
345378
346379\begin {frame }[fragile]{Avoid default capture modes}
0 commit comments