![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
The MPL Reference Manual: argBoost , ,
|
Front Page / Metafunctions / Composition and Argument Binding / arg |
template< int n > struct arg; template<> struct arg<1> { template< typename A1,... typename An = unspecified > struct apply { typedef A1 type; }; }; ... template<> struct arg<n> { template< typename A1,... typename An > struct apply { typedef An type; }; };
arg
#include <boost/mpl/arg.hpp>
Parameter | Requirement | Description |
---|---|---|
n | Интегральная постоянная | Несколько аргументов в пользу возвращения. |
Для любой интегральной постояннойnв диапазоне [1,BOOST_MPL_LIMIT_METAFUNCTION_ARITYи произвольные типыa1...a:
typedef apply_wrapn< arg<n>,a1,...an >::type x;
Return type: | A type. |
---|---|
Semantics: | x is identical to an. |
typedef apply_wrap5< arg<1>,bool,char,short,int,long >::type t1; typedef apply_wrap5< arg<3>,bool,char,short,int,long >::type t3; BOOST_MPL_ASSERT(( is_same< t1, bool > )); BOOST_MPL_ASSERT(( is_same< t3, short > ));
Статья The MPL Reference Manual: arg раздела может быть полезна для разработчиков на c++ и boost.
Материалы статей собраны из открытых источников, владелец сайта не претендует на авторство. Там где авторство установить не удалось, материал подаётся без имени автора. В случае если Вы считаете, что Ваши права нарушены, пожалуйста, свяжитесь с владельцем сайта.
:: Главная :: ::
реклама |