Definitely interesting to me. Also key_tuple<...> which would automatically tie a number of elements? On 27 September 2017 at 13:23, Andrey Semashev via Boost < boost@lists.boost.org> wrote:
On 09/27/17 13:53, Joaquin M López Muñoz via Boost wrote:
Consider the following:
struct element { int x; int f()const{return x;} };
int gf(const element& e){return e.x;}
using container=multi_index_container< element, indexed_by< ordered_unique
>, ordered_unique >, ordered_unique > > ;
With the advent in C++17 of auto non-type template parameters, it is very easy to provide a boost::multi_index::key class template so that we can write:
using container=multi_index_container< element, indexed_by< ordered_unique
>, ordered_unique >, ordered_unique > > ;
(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?
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman /listinfo.cgi/boost