unpack_args.rst
来自「Boost provides free peer-reviewed portab」· RST 代码 · 共 99 行
RST
99 行
.. Metafunctions/Invocation//unpack_args |30.. Copyright Aleksey Gurtovoy, David Abrahams 2007... Distributed under the Boost.. Software License, Version 1.0. (See accompanying.. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)unpack_args===========Synopsis--------.. parsed-literal:: template< typename F > struct unpack_args { // |unspecified| // |...| };Description-----------A higher-order primitive transforming an *n*-ary |Lambda Expression| ``F`` intoan unary |Metafunction Class| ``g`` accepting a single sequence of *n* arguments.Header------.. parsed-literal:: #include <boost/mpl/unpack_args.hpp>Model of--------|Metafunction Class|Parameters----------+---------------+-----------------------+-------------------------------------------+| Parameter | Requirement | Description |+===============+=======================+===========================================+| ``F`` | |Lambda Expression| | A lambda expression to adopt. |+---------------+-----------------------+-------------------------------------------+Expression semantics--------------------For an arbitrary |Lambda Expression| ``f``, and arbitrary types |a1...an|:.. parsed-literal:: typedef unpack_args<f> g;:Return type: |Metafunction Class|.:Semantics: ``g`` is a unary |Metafunction Class| such that .. parsed-literal:: apply_wrap\ *n*\ < g, vector<a1,\ |...|\ a\ *n*\ > >::type is identical to .. parsed-literal:: apply<F,a1,\ |...|\ a\ *n*\ >::typeExample-------.. parsed-literal:: BOOST_MPL_ASSERT(( apply< unpack_args< is_same<_1,_2> > , vector<int,int> > ));See also--------|Metafunctions|, |Lambda Expression|, |Metafunction Class|, |apply|, |apply_wrap|, |bind|
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?