- 327 名前:デフォルトの名無しさん mailto:sage [2009/04/12(日) 20:56:32 ]
- struct print_type
{ template < typename T > void operator () (T) const { std::cout << typeid(T).name() << std::endl ; } } ; int main() { using namespace boost::mpl::placeholders ; typedef boost::mpl::vector< int, char, std::string > vector; typedef boost::mpl::if_< boost::is_pod< _1 >, boost::add_pointer< _1 >, _1 > operate ; typedef boost::mpl::transform< vector, operate >::type result ; boost::mpl::for_each< result >( print_type() ) ; } 動いてるみたいだな。
|

|