Boost logo

Boost :

Subject: Re: [boost] [multi_index] Taking advantage of C++17 auto template params to simplify key specification
From: Joaquin M López Muñoz (joaquinlopezmunoz_at_[hidden])
Date: 2017-09-27 11:56:43


El 27/09/2017 a las 13:29, Richard Hodges via Boost escribió:
> Definitely interesting to me. Also key_tuple<...> which would automatically
> tie a number of elements?

This can also be done:

 Â  using container=multi_index_container<
 Â Â Â  element,
 Â Â Â  indexed_by<
ordered_unique<keys<element,&element::x,&element::f,&gf>>
 Â Â Â  >
 Â  >;

(see http://coliru.stacked-crooked.com/a/c2b27ff9542d6651 ). The only
annoyance
is that one has to specfiy element in keys<element,...> before the keys
proper.

Joaquín M López Muñoz


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