From: Andreas Pokorny (andreas.pokorny_at_[hidden])
Date: 2005-12-03 09:56:09


On Sat, Dec 03, 2005 at 08:21:04AM +0800, Joel de Guzman <joel_at_[hidden]> wrote:
> > There are entries in the map that do not require runtime data at all,
> > for these entries all information is coverd by the second template
> > parameter of pair. And others like the dimension_tag which require
> > an instance of the second type stored in the container.
> >
> > How can I acchieve that with fusion?
>
> If both the key and the data need to be just types, then what
> immediately comes to my mind is an mpl::map. What am I missing?
> Pure types == MPL. Half type/data == Fusion.

But I need both in the same associative container. What changes are
required to make fusion deal with:
template<typename F,typename S> struct ct_pair {
  typedef F first_type;
  typedef S second_type;
};

It would be acceptable if fusion::at<key>(seq), or deref on a ct_pair causes
compile errors, provided that the pair entries in the same container
still work.

Regards,
Andreas Pokorny