28 Mar
2007
28 Mar
'07
2:47 p.m.
Thanks a lot for your hint. It works perfectly. Here is the code: #include "boost/mpl/vector.hpp" #include <boost/mpl/find_if.hpp> #include <boost/mpl/at.hpp> using namespace std; using namespace boost; typedef mpl::vector<char, char> vec_1; typedef mpl::vector<char, int> vec_2; typedef mpl::vector<double, int> vec_3; typedef mpl::vector<vec_1, vec_2, vec_3> mat; typedef mpl::find_if< mat, is_same< mpl::at< mpl::_1, mpl::int_<0> >, double> >::type iter; int _tmain(int argc, _TCHAR* argv[]) { BOOST_STATIC_ASSERT(( is_same< mpl::deref<iter>::type, vec_3 >::value )); return 0; }