26 Mar
2007
26 Mar
'07
8:18 p.m.
Hi there, I'm trying to find a solution for looking for type vector containing a specific type. On another thread I was suggested to use at_c within the find_if algorithm. Unfortunately the code doesn't compile. #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<vec_1, vec_2> mat; typedef mpl::find_if<mat, is_same<mpl::at_c<mpl::_1,1>, int> >::type iter; int _tmain(int argc, _TCHAR* argv[]) { BOOST_STATIC_ASSERT(( is_same< mpl::deref<iter>::type, vec_2 >::value )); return 0; } Might this be a bug in the MPL lib? Thanks for any help, Christian