Boost logo

Boost Users :

From: boost_at_[hidden]
Date: 2007-10-03 03:18:17


Hi.

I'm trying to create a multi_index and I was wondering if its possible
to use a member of a member struct as index.

struct nested_element_t {
        int i;
};
struct element_t {
        nested_element_t ne;
};

I'm not sure if there's a way to use member key extractor or should I write my own

typedef multi_index_container<
    element_t,
    indexed_by<
        ordered_non_unique<tag<h>, member<nested_element_t ? , int, &nested_element_t> >
>
> set_t;

Regards.

-- 
Pedro Larroy Tovar, pedro at larroy dot com | http://pedro.larroy.com/
  * Las patentes de programación son nocivas para la innovación * 
               http://proinnova.hispalinux.es/

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