on Sun Jun 10 2007, Andrej van der Zee
Hi,
Than you for the quick reply :) Now I reimplemented intersect by converting the type sequences to mpl::set and do a mpl::has_key instead of mpl::contains:
template
struct intersect { typedef typename copy , insert< _1, _2 > > >::type set_seq2; typedef typename copy_if
, back_inserter < vector<> > >::type type; }; Now I would like to optimize this and only convert to a set if the type sequence does not support mpl::has_key. How should I do this?
I don't know, frankly.
I looked at the mpl::sequence_tag<seq2> but I am not sure how to use this. Nor if this is the right way to do this. Could you please help?
Maybe Aleksey can help. Sorry I couldn't. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com