3rdParty/boost/1.78.0/libs/mpl/doc/refmanual/arg.html
| Prev Next | Back Along | Up Home | Full TOC | Front Page / Metafunctions / Composition and Argument Binding / arg |
template< int n > struct[arg](./arg.html);
template<> struct[arg](./arg.html)<1>
{
template< typename A1,_..._typename A_n_=_unspecified_>
struct[apply](./apply.html){
typedef A1 type;
};
};_..._template<> struct[arg](./arg.html)<_n_>
{
template< typename A1,_..._typename A_n_>
struct[apply](./apply.html){
typedef A_n_type;
};
};
arg<n> specialization is a Metafunction Class that return the nth of its arguments.
#include <[boost/mpl/arg.hpp](../../../../boost/mpl/arg.hpp)>
| Parameter | Requirement | Description |
|---|---|---|
| n | An integral constant | A number of argument to return. |
For any integral constant n in the range [1, BOOST_MPL_LIMIT_METAFUNCTION_ARITY] and arbitrary types a1,... an:
typedef[apply\_wrap](./apply-wrap.html)_n_<[arg](./arg.html)<_n_>,a1,_..._a_n_>::type x;
| Return type: | A type. | | Semantics: | x is identical to an. |
typedef[apply\_wrap](./apply-wrap.html)5<[arg](./arg.html)<1>,bool,char,short,int,long >::type t1;
typedef[apply\_wrap](./apply-wrap.html)5<[arg](./arg.html)<3>,bool,char,short,int,long >::type t3;[BOOST\_MPL\_ASSERT](./assert.html)(( is_same< t1, bool > ));[BOOST\_MPL\_ASSERT](./assert.html)(( is_same< t3, short > ));
Composition and Argument Binding, Placeholders, lambda, bind, apply, apply_wrap
| Prev Next | Back Along | Up Home | Full TOC |
Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams 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) |