Boost logo

Boost Users :

Subject: Re: [Boost-users] [multi-index] multi-index type trait
From: Joaquin M Lopez Munoz (joaquin_at_[hidden])
Date: 2015-08-18 14:53:12


Joaquin M Lopez Munoz <joaquin <at> tid.es> writes:

>
> Joaquin M Lopez Munoz <joaquin <at> tid.es> writes:
>
> >
> > Elizabeta <elizabeta.petreska <at> gmail.com> writes:
> >
> > >
> > > Hi
> > > how to test if the first index of boost::multi-index is key based or
> > > sequence based at compile time[...]
> >
> > This can do:
> >
>
> Correction: this is terser and is prepared for Boost 1.59 (which
> includes a new type of key-based indices, namely ranked indices):
>

Just for the fun of it, the following variation is more future-proof
in the sense that it does not depend on the particular catalog of
indices that Boost.MultiIndex is providing for a given Boost version:

    #include <boost/multi_index_container_fwd.hpp>
    #include <boost/mpl/½°¹¡ÁÀø(€€€€¥¹±Õ‘”€ñ‰½½ÍнµÁ°½™É½¹Ð¹¡ÁÀø(€€€€(€€€Ñ•µÁ±…Ñ”ñÑåÁ•¹…µ”Y…±Õ”±ÑåÁ•¹…µ”%¹‘•àø(€€€ÕÍ¥¹œµ½¹½}¥¹‘•á}½¹Ñ…¥¹•Èô(€€€‰½½ÍÐèéµÕ±Ñ¥}¥¹‘•á}½¹Ñ…¥¹•Èð(€€€€€Y…±Õ”°(€€€€€‰½½ÍÐèéµÕ±Ñ¥}¥¹‘•àè饹‘•á•‘}‰äñ%¹‘•àø(€€€€øì(€€€€(€€€Ñ•µÁ±…Ñ”ñÑåÁ•¹…µ”Pø(€€€ÍÑÉՍЁٽ¥‘}Ð(€€€ì(€€€€€ÑåÁ•‘•˜Ù½¥ÑåÁ”ì(€€€ôì(€€€€(€€€Ñ•µÁ±…Ñ”ñÑåÁ•¹…µ”5ձѥ%¹‘•á ½¹Ñ…¥¹•È±ÑåÁ•¹…µ”õÙ½¥ø(€€€ÍÑÉՍЁ¥Í}™¥ÉÍÑ}¥¹‘•á}­•å}‰…Í•é‰½½ÍÐèéµÁ°èé™…±Í•}íôì(€€€€(€€€Ñ•µÁ±…Ñ”ñÑåÁ•¹…µ”5ձѥ%¹‘•á ½¹Ñ…¥¹•Èø(€€€ÍÑÉՍЁ¥Í}™¥ÉÍÑ}¥¹‘•á}­•å}‰…Í•ð(€€€€€5ձѥ%¹‘•á ½¹Ñ…¥¹•È°(€€€€€ÑåÁ•¹…µ”Ù½¥‘}Ðð(€€€€€€€ÑåÁ•¹…µ”µ½¹½}¥¹‘•á}½¹Ñ…¥¹•Èð(€€€€€€€€€ÑåÁ•¹…µ”5ձѥ%¹‘•á ½¹Ñ…¥¹•ÈèéÙ…±Õ•}ÑåÁ”°(€€€€€€€€€ÑåÁ•¹…µ”‰½½ÍÐèéµÁ°èé™É½¹Ðð(€€€€€€€€€€€ÑåÁ•¹…µ”5ձѥ%¹‘•á ½¹Ñ…¥¹•Èè饹‘•á}ÍÁ•¥™¥•É}ÑåÁ•}±¥ÍÐ(€€€€€㣧G—P¢㣦¶W•÷G—P¢㣧G—P¢ã¦&ö÷7C£¦×ã§G'VU÷·Ó° ¥F†—2W6W2vÇFW"'&÷vâw2fö–E÷BFV6†æ—VRFòFWFW&Ö–æRv†WF†W ¦×VÇF•ö–æFW…ö6öçF–æW"Â6öç7G'V7FVB÷WBöbF†Rf—'7B–æFW€¦öbF–ffW&VçBÂW6W"×&÷f–FVB×VÇF•ö–æFW…ö6öçF–æW"†2à¦VÖ&VFFVB¶W•÷G—RâF†RÖöæõö–æFW…ö6öçF–æW"–çFW&ÖVF–FR7FW—0¦æVVFVB&V6W6R÷F†W'v—6R¶W•÷G—RÖ–v‡BW†—7B'WB&R–æ66W6–&ÆP¢†f÷"–ç7Fæ6R–bF†Rf—'7B–æFW‚—26WVVæ6VBæBF†R6V6öæB÷&FW&VB’à¤Æ–âÆ–÷Rw&R&WGFW"öfbv—F‚F†R&Wf–÷W26öFRÂ2F†—0¦—2Æ–¶VÇ’FòF¶RÆöævW"Fò6ö×–ÆRà¤gVÆÂW†×ÆRB‡GG¢òö6öÆ—'Rç7F6¶VBÖ7&öö¶VBæ6öÒöóC#“&f3Sƒ3C6S  ¤¦ö\:ÖâÒÌ;7W¢×\;÷ ¥FVÆVl;6æ–


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