Boost logo

Boost Users :

Subject: Re: [Boost-users] [Multi-Index] has_index<BMI,TAG> meta-function
From: JOAQUIN M. LOPEZ MUÑOZ (joaquin_at_[hidden])
Date: 2009-07-14 18:49:07


________________________________________
De: boost-users-bounces_at_[hidden] [boost-users-bounces_at_[hidden]] En nombre de Dominique Devienne [ddevienne_at_[hidden]]
Enviado el: miércoles, 15 de julio de 2009 0:37
Para: boost-users_at_[hidden]
Asunto: Re: [Boost-users] [Multi-Index] has_index<BMI,TAG> meta-function

On Tue, Jul 14, 2009 at 5:11 PM, JOAQUIN M. LOPEZ MUÑOZ<joaquin_at_[hidden]> wrote:
> My own attempt below fails on tag_list precisely, and I don't
> understand why. Your post came just in time :) Although if someone can
> point where mine went wrong, I'm still interested.
>
> [...]
>
> using namespace boost;
> using boost::multi_index::detail::has_tag;
>
> template<typename BMI, typename TAG>
> struct has_index {
> typedef typename BMI::index_type_list index_type_list;
> typedef typename mpl::end<index_type_list>::type index_type_list_end;
> typedef typename has_tag<TAG>::template
> apply<index_type_list>::type iter;

has_tag applies to each index individually, not the entire index_type_list.

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo


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