summaryrefslogtreecommitdiff
path: root/doc/html/lambda.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/html/lambda.html')
-rw-r--r--doc/html/lambda.html183
1 files changed, 175 insertions, 8 deletions
diff --git a/doc/html/lambda.html b/doc/html/lambda.html
index 981656dc06..9419aa7e74 100644
--- a/doc/html/lambda.html
+++ b/doc/html/lambda.html
@@ -1,10 +1,177 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
- <head>
- <meta http-equiv="refresh" content="0; URL=http://www.boost.org/regression-logs/cs-win32_metacomm/doc/html/lambda.html">
- </head>
- <body>
- Automatic redirection failed, please go to
- <a href="http://www.boost.org/regression-logs/cs-win32_metacomm/doc/html/lambda.html">http://www.boost.org/regression-logs/cs-win32_metacomm/doc/html/lambda.html</a>
- </body>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Chapter 6. Boost.Lambda</title>
+<link rel="stylesheet" href="boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
+<link rel="start" href="index.html" title="The Boost C++ Libraries">
+<link rel="up" href="libraries.html" title="Part I. The Boost C++ Libraries">
+<link rel="prev" href="hash/acknowledgements.html" title=" Acknowledgements">
+<link rel="next" href="lambda/getting_started.html" title="Getting Started">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%">
+<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
+<td align="center"><a href="../../index.htm">Home</a></td>
+<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
+<td align="center"><a href="../../people/people.htm">People</a></td>
+<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
+<td align="center"><a href="../../more/index.htm">More</a></td>
+</table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="hash/acknowledgements.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="libraries.html"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="lambda/getting_started.html"><img src="images/next.png" alt="Next"></a>
+</div>
+<div class="chapter" lang="en">
+<div class="titlepage"><div>
+<div><h2 class="title">
+<a name="lambda"></a>Chapter 6. Boost.Lambda</h2></div>
+<div><div class="author">
+<h3 class="author">
+<span class="firstname">Jaakko</span> <span class="surname">Järvi</span>
+</h3>
+<code class="email">&lt;<a href="mailto:jarvi%20at%20cs%20tamu%20edu">jarvi at cs tamu edu</a>&gt;</code>
+</div></div>
+<div><p class="copyright">Copyright © 1999-2004 Jaakko Järvi, Gary Powell</p></div>
+<div><div class="legalnotice">
+<a name="id1222303"></a><p>Use, modification and distribution is subject to the Boost
+ Software License, Version 1.0. (See accompanying file
+ <code class="filename">LICENSE_1_0.txt</code> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</p>
+</div></div>
+</div></div>
+<div class="toc">
+<p><b>Table of Contents</b></p>
+<dl>
+<dt><span class="section"><a href="lambda.html#introduction">In a nutshell</a></span></dt>
+<dt><span class="section"><a href="lambda/getting_started.html">Getting Started</a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="lambda/getting_started.html#id1222408">Installing the library</a></span></dt>
+<dt><span class="section"><a href="lambda/getting_started.html#id1222668">Conventions used in this document</a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="lambda/s03.html">Introduction</a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="lambda/s03.html#id1222698">Motivation</a></span></dt>
+<dt><span class="section"><a href="lambda/s03.html#id1222933">Introduction to lambda expressions</a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="lambda/using_library.html">Using the library</a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="lambda/using_library.html#lambda.introductory_examples">Introductory Examples</a></span></dt>
+<dt><span class="section"><a href="lambda/using_library.html#lambda.parameter_and_return_types">Parameter and return types of lambda functors</a></span></dt>
+<dt><span class="section"><a href="lambda/using_library.html#lambda.actual_arguments_to_lambda_functors">About actual arguments to lambda functors</a></span></dt>
+<dt><span class="section"><a href="lambda/using_library.html#lambda.storing_bound_arguments">Storing bound arguments in lambda functions</a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="lambda/le_in_details.html">Lambda expressions in details</a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="lambda/le_in_details.html#lambda.placeholders">Placeholders</a></span></dt>
+<dt><span class="section"><a href="lambda/le_in_details.html#lambda.operator_expressions">Operator expressions</a></span></dt>
+<dt><span class="section"><a href="lambda/le_in_details.html#lambda.bind_expressions">Bind expressions</a></span></dt>
+<dt><span class="section"><a href="lambda/le_in_details.html#lambda.overriding_deduced_return_type">Overriding the deduced return type</a></span></dt>
+<dt><span class="section"><a href="lambda/le_in_details.html#lambda.delaying_constants_and_variables">Delaying constants and variables</a></span></dt>
+<dt><span class="section"><a href="lambda/le_in_details.html#lambda.lambda_expressions_for_control_structures">Lambda expressions for control structures</a></span></dt>
+<dt><span class="section"><a href="lambda/le_in_details.html#lambda.exceptions">Exceptions</a></span></dt>
+<dt><span class="section"><a href="lambda/le_in_details.html#lambda.construction_and_destruction">Construction and destruction</a></span></dt>
+<dt><span class="section"><a href="lambda/le_in_details.html#id1243846">Special lambda expressions</a></span></dt>
+<dt><span class="section"><a href="lambda/le_in_details.html#id1244283">Casts, sizeof and typeid</a></span></dt>
+<dt><span class="section"><a href="lambda/le_in_details.html#lambda.nested_stl_algorithms">Nesting STL algorithm invocations</a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="lambda/extending.html">Extending return type deduction system</a></span></dt>
+<dt><span class="section"><a href="lambda/s07.html">Practical considerations</a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="lambda/s07.html#id1245402">Performance</a></span></dt>
+<dt><span class="section"><a href="lambda/s07.html#id1245714">About compiling</a></span></dt>
+<dt><span class="section"><a href="lambda/s07.html#id1245749">Portability</a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="lambda/s08.html">Relation to other Boost libraries</a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="lambda/s08.html#id1246004">Boost Function</a></span></dt>
+<dt><span class="section"><a href="lambda/s08.html#id1246081">Boost Bind</a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="lambda/s09.html">Contributors</a></span></dt>
+<dt><span class="appendix"><a href="apa.html">A. Rationale for some of the design decisions</a></span></dt>
+<dd><dl><dt><span class="section"><a href="apa.html#lambda.why_weak_arity">
+Lambda functor arity
+</a></span></dt></dl></dd>
+<dt><span class="bibliography"><a href="lambda.html#id1246328">Bibliography</a></span></dt>
+</dl>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="introduction"></a>In a nutshell</h3></div></div></div>
+<p>
+
+ The Boost Lambda Library (BLL in the sequel) is a C++ template
+ library, which implements form of <span class="emphasis"><em>lambda abstractions</em></span> for C++.
+The term originates from functional programming and lambda calculus, where a lambda abstraction defines an unnamed function.
+ The primary motivation for the BLL is to provide flexible and
+ convenient means to define unnamed function objects for STL algorithms.
+In explaining what the library is about, a line of code says more than a thousand words; the
+ following line outputs the elements of some STL container
+ <code class="literal">a</code> separated by spaces:
+
+ </p>
+<pre class="programlisting">for_each(a.begin(), a.end(), std::cout &lt;&lt; _1 &lt;&lt; ' ');</pre>
+<p>
+
+ The expression <code class="literal">std::cout &lt;&lt; _1 &lt;&lt; ' '</code> defines a unary function object.
+ The variable <code class="literal">_1</code> is the parameter of this function, a <span class="emphasis"><em>placeholder</em></span> for the actual argument.
+ Within each iteration of <code class="literal">for_each</code>, the function is
+ called with an element of <code class="literal">a</code> as the actual argument.
+ This actual argument is substituted for the placeholder, and the &#8220;<span class="quote">body</span>&#8221; of the function is evaluated.
+ </p>
+<p>The essence of BLL is letting you define small unnamed function objects, such as the one above, directly on the call site of an STL algorithm.
+ </p>
+</div>
+<div class="bibliography">
+<div class="titlepage"><div><div><h2 class="title">
+<a name="id1246328"></a>Bibliography</h2></div></div></div>
+<div class="biblioentry">
+<a name="cit:stepanov:94"></a><p>[<span class="abbrev">STL94</span>] <span class="authorgroup"><span class="firstname">A. A.</span> <span class="surname">Stepanov</span> and <span class="firstname">M.</span> <span class="surname">Lee</span>. </span><span class="title"><i>The Standard Template Library</i>. </span><span class="orgname">Hewlett-Packard Laboratories. </span><span class="pubdate">1994. </span><span class="bibliomisc"><a href="http://www.hpl.hp.com/techreports" target="_top">www.hpl.hp.com/techreports</a>. </span></p>
+</div>
+<div class="biblioentry">
+<a name="cit:sgi:02"></a><p>[<span class="abbrev">SGI02</span>] <span class="title"><i>The SGI Standard Template Library</i>. </span><span class="pubdate">2002. </span><span class="bibliomisc"><a href="http://www.sgi.com/tech/stl/" target="_top">www.sgi.com/tech/stl/</a>. </span></p>
+</div>
+<div class="biblioentry">
+<a name="cit:c++:98"></a><p>[<span class="abbrev">C++98</span>] <span class="title"><i>International Standard, Programming Languages &#8211; C++</i>. </span><span class="subtitle">ISO/IEC:14882. </span><span class="pubdate">1998. </span></p>
+</div>
+<div class="biblioentry">
+<a name="cit:jarvi:99"></a><p>[<span class="abbrev">Jär99</span>] <span class="articleinfo"><span class="author"><span class="firstname">Jaakko</span> <span class="surname">Järvi</span>. </span><span class="title"><i>C++ Function Object Binders Made Easy</i>. </span>. </span><span class="title"><i>Lecture Notes in Computer Science</i>. </span><span class="volumenum">1977. </span><span class="publishername">Springer. </span><span class="pubdate">2000. </span></p>
+</div>
+<div class="biblioentry">
+<a name="cit:jarvi:00"></a><p>[<span class="abbrev">Jär00</span>] <span class="author"><span class="firstname">Jaakko</span> <span class="surname">Järvi</span>. </span><span class="author"><span class="firstname">Gary</span> <span class="surname">Powell</span>. </span><span class="title"><i>The Lambda Library : Lambda Abstraction in C++</i>. </span><span class="orgname">Turku Centre for Computer Science. </span><span class="bibliomisc">Technical Report . </span><span class="issuenum">378. </span><span class="pubdate">2000. </span><span class="bibliomisc"><a href="http://www.tucs.fi/Publications/techreports/TR378.php" target="_top">www.tucs.fi/publications</a>. </span></p>
+</div>
+<div class="biblioentry">
+<a name="cit:jarvi:01"></a><p>[<span class="abbrev">Jär01</span>] <span class="author"><span class="firstname">Jaakko</span> <span class="surname">Järvi</span>. </span><span class="author"><span class="firstname">Gary</span> <span class="surname">Powell</span>. </span><span class="title"><i>The Lambda Library : Lambda Abstraction in C++</i>. </span><span class="confgroup"><span class="conftitle">Second Workshop on C++ Template Programming. </span><span class="address">Tampa Bay, OOPSLA'01. </span>. </span><span class="pubdate">2001. </span><span class="bibliomisc"><a href="http://www.oonumerics.org/tmpw01/" target="_top">www.oonumerics.org/tmpw01/</a>. </span></p>
+</div>
+<div class="biblioentry">
+<a name="cit:jarvi:03"></a><p>[<span class="abbrev">Jär03</span>] <span class="articleinfo"><span class="author"><span class="firstname">Jaakko</span> <span class="surname">Järvi</span>. </span><span class="author"><span class="firstname">Gary</span> <span class="surname">Powell</span>. </span><span class="author"><span class="firstname">Andrew</span> <span class="surname">Lumsdaine</span>. </span><span class="title"><i>The Lambda Library : unnamed functions in C++</i>. </span>. </span><span class="title"><i>Software - Practice and Expreience</i>. </span><span class="volumenum">33:259-291. </span><span class="pubdate">2003. </span></p>
+</div>
+<div class="biblioentry">
+<a name="cit:boost::tuple"></a><p>[<span class="abbrev">tuple</span>] <span class="title"><i>The Boost Tuple Library</i>. </span><span class="bibliomisc"><a href="http://www.boost.org/libs/tuple/doc/tuple_users_guide.html" target="_top">www.boost.org/libs/tuple/doc/tuple_users_guide.html</a>. </span><span class="pubdate">2002. </span></p>
+</div>
+<div class="biblioentry">
+<a name="cit:boost::type_traits"></a><p>[<span class="abbrev">type_traits</span>] <span class="title"><i>The Boost type_traits</i>. </span><span class="bibliomisc"><a href="http://www.boost.org/libs/type_traits/index.htm" target="_top">www.boost.org/libs/type_traits/</a>. </span><span class="pubdate">2002. </span></p>
+</div>
+<div class="biblioentry">
+<a name="cit:boost::ref"></a><p>[<span class="abbrev">ref</span>] <span class="title"><i>Boost ref</i>. </span><span class="bibliomisc"><a href="http://www.boost.org/libs/bind/ref.html" target="_top">www.boost.org/libs/bind/ref.html</a>. </span><span class="pubdate">2002. </span></p>
+</div>
+<div class="biblioentry">
+<a name="cit:boost::bind"></a><p>[<span class="abbrev">bind</span>] <span class="title"><i>Boost Bind Library</i>. </span><span class="bibliomisc"><a href="http://www.boost.org/libs/bind/bind.html" target="_top">www.boost.org/libs/bind/bind.html</a>. </span><span class="pubdate">2002. </span></p>
+</div>
+<div class="biblioentry">
+<a name="cit:boost::function"></a><p>[<span class="abbrev">function</span>] <span class="title"><i>Boost Function Library</i>. </span><span class="bibliomisc"><a href="http://www.boost.org/libs/function/" target="_top">www.boost.org/libs/function/</a>. </span><span class="pubdate">2002. </span></p>
+</div>
+<div class="biblioentry">
+<a name="cit:fc++"></a><p>[<span class="abbrev">fc++</span>] <span class="title"><i>The FC++ library: Functional Programming in C++</i>. </span><span class="author"><span class="firstname">Yannis</span> <span class="surname">Smaragdakis</span>. </span><span class="author"><span class="firstname">Brian</span> <span class="surname">McNamara</span>. </span><span class="bibliomisc"><a href="http://www.cc.gatech.edu/~yannis/fc++/" target="_top">www.cc.gatech.edu/~yannis/fc++/</a>. </span><span class="pubdate">2002. </span></p>
+</div>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"><small><p>Last revised: November 28, 2004 at 03:29:16 GMT</p></small></td>
+<td align="right"><small></small></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="hash/acknowledgements.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="libraries.html"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="lambda/getting_started.html"><img src="images/next.png" alt="Next"></a>
+</div>
+</body>
</html>