Added libs/mpl

[SVN r15384]
This commit is contained in:
Dave Abrahams committed 2002-09-16 19:25:33 +00:00
1 parent 6ec072c403
commit 01d61922bc
238 files changed
+15885

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
<!-- ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| section -->
<section id="lambda">
<title>Lambda facility</>
<para>
<firstterm>Lambda expressions</> is a way of inline meta-function composition.
building more complex, more interesting functions from the existing ones. The simplest case of function composition is an operation of taking the result from one function (<literal>g</>) and using that as the argument to another function (<literal>f</>) - <literal>f(g(x))</>. [Talk about run-time &Cxx; facilities to do function composition in &Cxx; - SGI STL <literal>compose1</>/<literal>compose2</>, Boost Compose library, Boost Bind library]
</>
<para>
The library provide support for several styles of function composition. The facilities differ in portability, implementation complexity, readability, and performance characteristics.
</>
<!-- ||||||||||||||||||||||||||||| subsection -->
<section id="bind.compose">
<title>compose</>
<programlisting>
<![CDATA[
using mpl::placeholders;
typedef mpl::bind< mpl::make_f2<boost::is_same>,int,_2 > is_int;
typedef mpl::bind< add_pointer,mpl::bind<add_const,_1> > add_const_pointer;
]]>
</>
</section>
</section>