Boost logo

Boost :

From: Joaquín Mª López Muñoz (joaquin_at_[hidden])
Date: 2003-09-10 08:07:38

This should have been posted to the Users list, but seems like
it is temporarily disabled.

Say I've got a MPL sequence whose elements
contain a nested typedef "type_list" which is also a MPL sequence
(so, a sequence of sequences). This algorithm looks for an element
of such a sequence having a given type in its "type_list" typedef:

template<typename TypeListofTypeLists,typename Type>
struct find_type
  typedef typename mpl::find_if<
>::type iter;

  typedef typename iter::type type;

template<typename Type>
struct has_type
  template<typename TypeListofTypeListsElement>
  struct apply:mpl::contains<
    BOOST_DEDUCED_TYPENAME TypeListofTypeListsElement::type_list,

This works but seems to make MSVC++ 6.0 choke under moderate
stress. Any idea to simplify it? (unrolling, etc.) Thanx in advance

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

Boost list run by bdawes at, gregod at, cpdaniel at, john at