|
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ձѥ%¹á
½¹Ñ
¥¹Èè饹á}ÍÁ¥¥É}ÑåÁ}±¥ÍÐ(øèéÑåÁ(ø(íôì()Õ±°á
µÁ±
СÑÑÀè¼½½±¥ÉÔ¹ÍÑ
µÉ½½¹½´½¼ÕÀÄÌÔÙÀäÀáå())½
Å×µ¸43ÍÁè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