On Tue, Jul 14, 2009 at 5:11 PM, JOAQUIN M. LOPEZ MUÑOZ
I'd like to use enable_if/disable_if with a meta-function that determines whether a given multi-index container has a given tagged index. You can use this:
template<typename Index> struct tag_list { typedef typename Index::tag_list type; };
template
struct has_index: boost::mpl::contains< boost::mpl::transform_view< typename MultiIndexContainer::index_type_list, boost::mpl::contains boost::mpl::_,Tag> >, boost::mpl::true_ > {};
Thanks. This appears to be working for me (i.e. I'm getting to errors
past this code, which I'll need to clear before I can fully test it).
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.
Once again, thank you Joaquín! --DD
error C2039: 'tag_list' : is not a member of
'boost::mpl::vector3