|
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ձѥ%¹á
½¹Ñ
¥¹Èè饹á}ÍÁ¥¥É}ÑåÁ}±¥ÍÐ(㣧GP¢ã£¦¶W÷GP¢ã£§GP¢ã¦&ö÷7C£¦×ã§G'VU÷·Ó° ¥F2W6W2vÇFW"'&÷vâw2föE÷BFV6æVRFòFWFW&ÖæRvWFW ¦×VÇFöæFW
ö6öçFæW"Â6öç7G'V7FVB÷WBöbFRf'7BæFW¦öbFffW&VçBÂW6W"×&÷fFVB×VÇFöæFW
ö6öçFæW"Â2à¦VÖ&VFFVB¶W÷GRâFRÖöæõöæFW
ö6öçFæW"çFW&ÖVFFR7FW0¦æVVFVB&V6W6R÷FW'v6R¶W÷GRÖvBW7B'WB&Ræ66W6&ÆP¢f÷"ç7Fæ6RbFRf'7BæFW26WVVæ6VBæBFR6V6öæB÷&FW&VBà¤ÆÂâÆÂÂ÷Rw&R&WGFW"öfbvFFR&Wf÷W26öFRÂ2F0¦2ƶVÇFòF¶RÆöævW"Fò6ö×ÆRà¤gVÆÂW×ÆRBGG¢òö6öÆ'Rç7F6¶VBÖ7&öö¶VBæ6öÒöóC#&f3S3C6S ¤¦ö\:ÖâÒÌ;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