
Uthpal Urubail escribió:
Joaquín M López Muñoz, Thanks for offering me the help.
You're welcome. Please don't top-post and try to follow the general discussion policies outlined at http://www.boost.org/community/policy.html
One interesting observation: If I use the below in finding the objects it is not retrieving properly indexed_by< ordered_unique< /// INSTEAD if I use ordered_non_unique< it works fine composite_key<
If you use ordered_unique then there cannot be two elements with the same node[0], node[1], node[2] values. I guess this is what's happening in your case.
I am still not clear with my question:2 Can I define the container like below? I don't want to create the temporary data structure. I will get these information from a class object. Can I use them directly?? Please help me in understanding.
typedef multi_index_container<
, //?? indexed_by< ordered_unique< composite_key< , //??? BookNodeExtractor<0>, BookNodeExtractor<1>, BookNodeExtractor<2> > >, ordered_unique< member > > beambook;
I'm not sure what your question is, but if you wonder whether you can define a container of pointers to Books rather than Book objects proper, the answer is: you can, but you have to modify BookNodeExtractor so that it accepts pointers rather than Book &s. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo