📄 lambda.sgml
字号:
<!-- ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 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>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -