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:54:35


El 27/09/2017 a las 13:23, Andrey Semashev via Boost escribió:
> On 09/27/17 13:53, Joaquin M López Muñoz via Boost wrote:
>>
>>    using container=multi_index_container<
>>      element,
>>      indexed_by<
>>        ordered_unique<key<&element::x>>,
>>        ordered_unique<key<&element::f>>,
>>        ordered_unique<key<&gf>>
>>      >
>>    >;
>>
>> (Example at http://coliru.stacked-crooked.com/a/5742c768cc093c03 ).
>>
>> Is there interest in adding this to Boost.MultiIndex? Comments on
>> this or
>> alternative syntaxes?
>
> Looks interesting. The C++03 version always seemed verbose to me.
> Will it also support function objects for key extraction?

This key thing is just a wrapper over member/[const_]mem_fun/global_fun,
so everything working before (including using function objects as key
extractors)
would continue to work.

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