Karl Friedrich Walkow
i try to find a solution for eliminating all duplicates of types in a non-integral sequence. the only extisting solution i found has a set< > as output, but i want to keep the sequence type. the following code _should_ solve the problem, but there seems to be something wrong with it.
if someone has an idea...
// untested template <class S> remove_duplicates { typedef typename fold< S , pair< typename clear<S>::type, set0<> > , if_< contains< second<_1>, _2 > , _1 , pair< push_back< first<_1>, _2> , insert< second<_1>, _2 > > > >::type::first type; }; HTH, -- Dave Abrahams Boost Consulting www.boost-consulting.com