
Was your intention to store lists of pairs as you show in the multi_index
declaration
std::list<
std::pair<
/*value*/
unsigned char,
std::pair<
/*x co-ordinate*/
unsigned char,
/*y co-ordinate*/
unsigned char
>
>
>,
or just tuples of {unsigned Value, X-coordinate,Y coordinate} emulated by
Value, std::pair
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> > >
If the latter is the case have you thought of using boost::tuple directly? Just a thought Kimon On Sun, Apr 26, 2009 at 4:11 PM, Etienne Philip Pretorius < icewolfhunter@gmail.com> wrote:
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 mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users