|
Boost Users : |
From: Joaquín Mª López Muñoz (joaquin_at_[hidden])
Date: 2007-05-10 04:49:05
Ares Lagae ha escrito:
> Jeffrey Holle wrote:
>
> > Boost::variant if you want your variable to hold just one of the types,
> > and hopefully you know what type is holds.
> > You have to use a variant visitor to access it if you don't.
> > Attempts to use get<int> when the type isn't castable to it will throw
> > an exception.
> >
>
> Union-like containers are not suited, because I want a variable for _each_
> of the types. See my other post about boost::fusion::map.
I guess fusion can be used to implement what you want, but MPL probably
also suffices. Please see the attached file, is this kind of what you're
after?
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