如果您正在寻找一种indexOf功能,我想Boost.MPL文档中涉及的示例
find将达到目的:
typedef vector<char,int,unsigned,long,unsigned long> types;typedef find<types,unsigned>::type iter;BOOST_MPL_ASSERT(( is_same< deref<iter>::type, unsigned > ));BOOST_MPL_ASSERT_RELATION( iter::pos::value, ==, 2 );
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)