
I solved it. I crawled through the mpl sources (not an easy task) and found how it has to work.
The predicate needs to be defined as:
template
struct contained { static const int value=is_same ::value; template struct apply; }; I tested again and I realized that the nested apply may be omitted and it works also as it should.
template<int i> struct Slot { typedef Slot type; typedef int_<i> slot_id; }; typedef vector
, Slot<10>, Slot<15> > slots; typedef find_if > >::type t10; BOOST_MPL_ASSERT(( is_same< deref<t10>::type, Slot<10> > )); This works as intended. However, finding out how to write such a predicate, was very hard. Providing examples, describing the different kinds of predicates and how they need to be written in order to work with placeholders, would be very helpful. Maybe such things could be added to the mpl documentation, because I am sure, I am not the first that came up with such an issue.
Regards, Michael