@@ -69,6 +69,7 @@ \subsection{Lambdas}
6969{
7070 // Only three lines for the equivalent of the type
7171 // declaration, definition and the instantiation.
72+ // The third argument is a lambda.
7273 return std::find_if
7374 (strings.begin(), strings.end(),
7475 [=](const std::string& string) -> bool
@@ -93,12 +94,12 @@ \subsubsection{The Internals of Lambdas}
9394[a, b, c]( /* arguments */ ) -> T { /* statements */ }
9495\end {lstlisting }
9596
96- is totally equivalent to
97+ is equivalent to
9798
9899\ begin{lstlisting}
99100struct something
100101{
101- T operator( /* arguments */ ) const { /* statements */ }
102+ T operator()( /* arguments */ ) const { /* statements */ }
102103
103104 /* deduced type */ a;
104105 /* deduced type */ b;
@@ -124,9 +125,9 @@ \subsubsection{The Internals of Lambdas}
124125\item {\it capture} is a list of variables from the parent scope that
125126 must be accessible inside the lambda. Use \code {[=]} to tell the
126127 compiler to automatically copy any variable used by the lambda, or
127- \code {[\& ]} to keep a reference to the used variables from the
128- parent scope. Variables can also be captured in a fine-grained way,
129- e.g. \code {[=a, \& b]} to copy the value of \code {a} but store a
128+ \code {[\& ]} to keep a reference to the corresponding variables from
129+ the parent scope. Variables can also be captured in a fine-grained
130+ way, e.g. \code {[=a, \& b]} to copy the value of \code {a} but store a
130131 reference to \code {b}.
131132\item {\it arguments} are the arguments of the function.
132133\item By default the variables captured by value cannot be assigned to
0 commit comments