Boost logo

Boost :

From: Rob Stewart (stewart_at_[hidden])
Date: 2004-04-26 15:16:38


From: Joaquin M Lopez Munoz <joaquin_at_[hidden]>
>
> Composite keys can be specified by a new construct
> called composite_key in the following manner:
>
> struct record
> {
> int first;
> int second
> int third;
> };
>
> multi_index_container<
> record,
> indexed_by<
> composite_key<
> record, //base value
> member<record,int,&record::first>, // first key

Would that you could make this work to avoid the duplication and
chance for errors:

        member< &record::first >

I know a function template can deduce the other types, but I
can't think of how to make it work here.

-- 
Rob Stewart                           stewart_at_[hidden]
Software Engineer                     http://www.sig.com
Susquehanna International Group, LLP  using std::disclaimer;

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk