Boost logo

Boost Users :

Subject: Re: [Boost-users] Creating a map between two sets of classes
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-03-01 14:17:33


AMDG

Gokulakannan Somasundaram wrote:
> I have a requirement where in i have a set of classes and they have a
> one on one correspondence with another set of classes. Consider something
> like this
> a) template<class A>
> class Walkers
> {
> int walk( Context<A>* context );
> };
>
> The set of Context classes are not templates. They are individual classes. I
> need to create a mapping between these two sets. One way, i could think of
> is to create a typelist and refer to the class at the appropriate location.
> But i feel that is more error prone, as i may mismatch the Contexts in the
> typelist. Can someone advise me how to do this using any of the boost
> libraries?
>

Could you use mpl::map? I don't really understand what you're trying to
do, however.

In Christ,
Steven Watanabe


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