Boost logo

Boost Users :

Subject: Re: [Boost-users] multi_index_container + composite key
From: Igor R (boost.lists_at_[hidden])
Date: 2011-11-24 04:44:27


>       Elem_entry fc1 = Elem_entry(1,90,99);
> Extracting:
>       elementbook::iterator it;
>       it = pb.find(boost::make_tuple(99,90)); ????? Is it possible to
> simulate this requirement?

How do you expect MIC to know what 99 is and what 90 is? MIC assumes
that the order of tuple elements corresponds to the order of the part
in your composite key:

>         composite_key<
>             Elem_entry,
>             member<Elem_entry,unsigned int,&Elem_entry::node1>,
>             member<Elem_entry,unsigned int,&Elem_entry::node2>
>             >

i.e., the 1st one is node1, and the 2dn one is node2.


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