3-0
template<int N>
struct cal
{
BOOST_STATIC_ASSERT((N%10>=0));
BOOST_STATIC_ASSERT((N%10<2));
static const int val = 2*cal<N/10>::val+N%10;
};
template<>
struct cal<0>
{
static const int val = 0;
};
3-1,3-2
BOOST_STATIC_ASSERT((mpl::equal<vector_c<int,2,3,4>,mpl::transform<vector_c<int,1,2,3>,vector_c<int,1,1,1>,plus_f>::type>::type::value));
BOOST_STATIC_ASSERT((mpl::equal<vector_c<int,1,4,9>,mpl::transform<vector_c<int,1,2,3>,vector_c<int,0,2,6>,plus_f>::type>::type::value));
3-3,3-4其实差不多
template<typename F,typename T>
struct fourtimes:twice<F,typename twice<F,T>::type>{};
3-5
template&l