Boost logo

Boost :

From: Daniel Wallin (dalwan01_at_[hidden])
Date: 2003-11-08 22:31:21


Matthias Schabel wrote:
> How does one implement append? That is, given
>
> typedef mpl::list<t1,t2,t3> l1;
> typedef mpl::list<t4,t5> l2;
>
> typedef append<l1,l2> --> mpl::list<t1,t2,t3,t4,t5>
>
> I've tried things like
>
> typedef typename mpl::iter_fold<S2,S1,push_back<_1,deref<_2> > >::type a;

   template<class Seq1, class Seq2>
   struct append
       : mpl::insert_range<
            Seq1
          , typename mpl::end<Seq1>::type
          , Seq2
>
   {};

-- 
Daniel Wallin

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk