![]() |
![]() ![]() ![]() ![]() |
![]() |
The MPL Reference Manual: pairBoost , ,
|
||||||||
| Front Page / Data Types / Miscellaneous / pair |
template<
typename T1
, typename T2
>
struct pair
{
typedef pair type;
typedef T1 first;
typedef T2 second;
};
Прозрачный держатель для двух произвольных типов.
#include <boost/mpl/pair.hpp>
Подсчитайте ряд элементов в последовательности вместе с рядом отрицательных элементов среди них.
typedef fold< vector_c<int,-1,0,5,-7,-2,4,5,7> , pair< int_<0>, int_<0> > , pair< next< first<_1> > , if_< less< _2, int_<0> > , next< second<_1> > , second<_1> > > >::type p; BOOST_MPL_ASSERT_RELATION( p::first::value, ==, 8 ); BOOST_MPL_ASSERT_RELATION( p::second::value, ==, 3 );
Статья The MPL Reference Manual: pair раздела может быть полезна для разработчиков на c++ и boost.
:: Главная :: ::
реклама |