Boost logo

Boost Users :

From: David Abrahams (dave_at_[hidden])
Date: 2007-03-23 23:58:28


on Fri Mar 23 2007, David Abrahams <dave-AT-boost-consulting.com> wrote:

>>From scratch (untested):

And now, just by inspection...

> template <class Seq, class E>
> struct erase_first
> {
> typedef typename mpl::find<Seq, T>::type i;
> typedef typename eval_if<
> boost::is_same<i, typename mpl::end<Seq> >
                                                       ^::type
> , mpl::identity<Seq>
> , mpl::erase<Seq,i>
> >::type type;
> };
>
> HTH,

HTH-ly y'rs,

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net