]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | <html> |
2 | <head> | |
3 | <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> | |
4 | <title>Scope</title> | |
5 | <link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> | |
6 | <meta name="generator" content="DocBook XSL Stylesheets V1.75.2"> | |
7 | <link rel="home" href="../../index.html" title="Chapter 1. Phoenix 3.2.0"> | |
8 | <link rel="up" href="../modules.html" title="Modules"> | |
9 | <link rel="prev" href="object/casts.html" title="Casts"> | |
10 | <link rel="next" href="scope/local_variables.html" title="Local Variables"> | |
11 | </head> | |
12 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> | |
13 | <table cellpadding="2" width="100%"><tr> | |
14 | <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> | |
15 | <td align="center"><a href="../../../../../../index.html">Home</a></td> | |
16 | <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> | |
17 | <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> | |
18 | <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> | |
19 | <td align="center"><a href="../../../../../../more/index.htm">More</a></td> | |
20 | </tr></table> | |
21 | <hr> | |
22 | <div class="spirit-nav"> | |
23 | <a accesskey="p" href="object/casts.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../modules.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="scope/local_variables.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> | |
24 | </div> | |
25 | <div class="section"> | |
26 | <div class="titlepage"><div><div><h3 class="title"> | |
27 | <a name="phoenix.modules.scope"></a><a class="link" href="scope.html" title="Scope">Scope</a> | |
28 | </h3></div></div></div> | |
29 | <div class="toc"><dl> | |
30 | <dt><span class="section"><a href="scope/local_variables.html">Local Variables</a></span></dt> | |
31 | <dt><span class="section"><a href="scope/let.html">let</a></span></dt> | |
32 | <dt><span class="section"><a href="scope/lambda.html">lambda</a></span></dt> | |
33 | </dl></div> | |
34 | <p> | |
35 | Up until now, the most basic ingredient is missing: creation of and access | |
36 | to local variables in the stack. When recursion comes into play, you will | |
37 | soon realize the need to have true local variables. It may seem that we do | |
38 | not need this at all since an unnamed lambda function cannot call itself | |
39 | anyway; at least not directly. With some sort of arrangement, situations | |
40 | will arise where a lambda function becomes recursive. A typical situation | |
41 | occurs when we store a lambda function in a <a href="http://www.boost.org/libs/function" target="_top">Boost.Function</a>, | |
42 | essentially naming the unnamed lambda. | |
43 | </p> | |
44 | <p> | |
45 | There will also be situations where a lambda function gets passed as an argument | |
46 | to another function. This is a more common situation. In this case, the lambda | |
47 | function assumes a new scope; new arguments and possibly new local variables. | |
48 | </p> | |
49 | <p> | |
50 | This section deals with local variables and nested lambda scopes. | |
51 | </p> | |
52 | </div> | |
53 | <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> | |
54 | <td align="left"></td> | |
55 | <td align="right"><div class="copyright-footer">Copyright © 2002-2005, 2010, 2014, 2015 Joel de Guzman, Dan Marsden, Thomas | |
56 | Heller, John Fletcher<p> | |
57 | Distributed under the Boost Software License, Version 1.0. (See accompanying | |
58 | file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) | |
59 | </p> | |
60 | </div></td> | |
61 | </tr></table> | |
62 | <hr> | |
63 | <div class="spirit-nav"> | |
64 | <a accesskey="p" href="object/casts.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../modules.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="scope/local_variables.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> | |
65 | </div> | |
66 | </body> | |
67 | </html> |