// Copyright 2005 Alexander Nasonov. // 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) #include #include #include #include #include #include #include #include namespace mpl = boost::mpl; int main() { using namespace mpl::placeholders; typedef mpl::vector< char , signed char // 1 , unsigned char , short int const // 3 , unsigned short int , int volatile // 5 , unsigned int // 6 , long // 7 , unsigned long // 8 , float const // 9 > types; typedef mpl::transform< types , mpl::lambda< boost::promote<_> >::type >::type promoted; BOOST_STATIC_ASSERT(( ::boost::is_same< mpl::at_c::type, int >::value )); BOOST_STATIC_ASSERT(( ::boost::is_same< mpl::at_c::type, int const >::value )); BOOST_STATIC_ASSERT(( ::boost::is_same< mpl::at_c::type, int volatile >::value )); BOOST_STATIC_ASSERT(( ::boost::is_same< mpl::at_c::type, unsigned int >::value )); BOOST_STATIC_ASSERT(( ::boost::is_same< mpl::at_c::type, long >::value )); BOOST_STATIC_ASSERT(( ::boost::is_same< mpl::at_c::type, unsigned long >::value )); BOOST_STATIC_ASSERT(( ::boost::is_same< mpl::at_c::type, double const >::value )); return 0; }