Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost.MultiIndex question on merge
From: Ovanes Markarian (om_boost_at_[hidden])
Date: 2009-04-28 10:36:14


why not using an stl algorithm? If you use ordered_non_unique you can use
the for_each algorithms with an inserter functor.

Ovanes

On Tue, Apr 28, 2009 at 3:46 PM, arm2arm <arm2arm_at_[hidden]> wrote:

>
> Hello,
> Are there way to merge two multiindex objects ?
> suppouse we have :
>
> struct strData{
> int id;
> float a, b;
> strData(int id_, float a_, float b_):a(a_),b(b_),id(id_){}
> };
>
> typedef multi_index_container<
> strData,
> indexed_by<
> ordered_unique<
> tag<id>, BOOST_MULTI_INDEX_MEMBER(strData,int,id)>,
> ordered_non_unique<
> tag<snap>,BOOST_MULTI_INDEX_MEMBER(strData,float,a)>
> >
> > data_setA, data_setB;
> Are there way to do:
>
> data_setA.merge(data_setB) ?
>
> thank you beforehand.
> Arman.
> --
> View this message in context:
> http://www.nabble.com/Boost.MultiIndex-question-on-merge-tp23277496p23277496.html
> Sent from the Boost - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>



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