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 04:56:59


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):

    #include <boost/multi_index/sequenced_index_fwd.hpp>
    #include <boost/multi_index/random_access_index_fwd.hpp>
    #include <boost/mpl/bool.hpp>
    #include <boost/mpl/front.hpp>
    
    template<typename Index>
    struct is_key_based_index:boost::mpl::true_{};
    
    template<typename... Args>
    struct is_key_based_index<
      boost::multi_index::seque•ñɝ̸¸¸ø(€€€€ø鉽½ÍÐèéµÁ°èé™…±Í•}íôì(€€€€(€€€Ñ•µÁ±…Ñ”ñÑåÁ•¹…µ”¸¸¸ɝÌø(€€€ÍÑÉՍЁ¥Í}­•å}‰…Í•‘}¥¹‘•àð(€€€€€‰½½ÍÐèéµÕ±Ñ¥}¥¹‘•àèéÉ…¹‘½µ}…•ÍÌñɝ̸¸¸ø(€€€€ø鉽½ÍÐèéµÁ°èé™…±Í•}íôì(€€€€(€€€Ñ•µÁ±…Ñ”ñÑåÁ•¹…µ”5ձѥ%¹‘•á ½¹Ñ…¥¹•Èø(€€€ÍÑÉՍЁ¥Í}™¥ÉÍÑ}¥¹‘•á}­•å}‰…Í•è(€€€€€¥Í}­•å}‰…Í•‘}¥¹‘•àð(€€€€€€€ÑåÁ•¹…µ”‰½½ÍÐèéµÁ°èé™É½¹Ðð(€€€€€€€€€ÑåÁ•¹…µ”5ձѥ%¹‘•á ½¹Ñ…¥¹•Èè饹‘•á}ÍÁ•¥™¥•É}ÑåÁ•}±¥ÍÐ(€€€€€€€€øèéÑåÁ”(€€€€€€ø(€€€íôì()Õ±°•á…µÁ±”…Ё¡ÑÑÀè¼½½±¥ÉÔ¹ÍÑ…­•µÉ½½­•¹½´½„¼Õ„ÀÄÌÔÙ˜ÀäÀᙐå„())½…Å×µ¸43ÍÁ•è5׎è)Q•±•›͹¥„


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