Boost logo

Boost Users :

Subject: [Boost-users] Multi Index: Nested std::pair
From: Etienne Philip Pretorius (icewolfhunter_at_[hidden])
Date: 2009-04-26 09:11:12


Hello List,

I would greatly appreciate if someone could assist me in getting this
structure correct.

     boost::multi_index_container<
         std::list<
             std::pair<
                 /*value*/
                 unsigned char,
                 std::pair<
                     /*x co-ordinate*/
                     unsigned char,
                     /*y co-ordinate*/
                     unsigned char
>
>
>,
         boost::multi_index::indexed_by<
             /*value*/
             boost::multi_index::ordered_non_unique<
                 boost::multi_index::identity<unsigned char>
>,
             /*x co-ordinate*/
             boost::multi_index::ordered_non_unique<
                 boost::multi_index::identity<unsigned char>
>,
             /*y co-ordinate*/
             boost::multi_index::ordered_non_unique<
                 boost::multi_index::identity<unsigned char>
>
>
> m;

I do not see how "boost::multi_index::ordered_non_unique" will index the
appropriate field in the nested std::pair structures. This is why I
suspect there to be a problem with this structure.

So before I continue, could someone please tell me if I am on the
correct path.

Grateful,
Etienne


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