lambda.sgml
来自「boost库提供标准的C++ API 配合dev c++使用,功能更加强大」· SGML 代码 · 共 31 行
SGML
31 行
<!-- ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 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 + =
减小字号Ctrl + -
显示快捷键?