Hi,
I started learn mpl and here we go...
I have an mpl::vector of compund types and i want to find an element in
vector based on
property of compound type and cannot find the way to do it, any suggestions?
Here is an example how i'm trying to do it:
#include
#include
#include
namespace mpl = boost::mpl;
template
struct Type2IdLink {
typedef T value_type;
typedef mpl::int_<id> type_id;
};
typedef Type2IdLink v1;
typedef Type2IdLink v2;
typedef Type2IdLink v3;
typedef mpl::vector types;
// This work
typedef mpl::find_if >::type iter;
// This does not work:
// value_type is not a member of mpl_::_1
typedef mpl::find_if >::type
iter;
BOOST_MPL_ASSERT_RELATION( iter::pos::value, == , 1);
Using BOOST version 1.38, GCC4.3.
Thank You
--
View this message in context: http://www.nabble.com/mpl%3A%3Afind_if---placeholder-question-tp23463044p234...
Sent from the Boost - Users mailing list archive at Nabble.com.