From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-02-15 07:58:44
----- Original Message -----
From: "Emily Winch" <emily_at_[hidden]>
> > The name "associative_list" is perhaps a bit too generic for this
> > class. Mainly because it doesn't say that it uses types as keys and
> > objects as values.
> I think you're right. There's probably a use for an associative_list which
> associates types with types. This seems to be a common pattern: a family
> components that differ only in how much is known at compile time.
> std::vector<boost::any> -> std::vector<Andrei's variant> -> boost::tuple
> std::multimap -> associative_list (of types and values ->
> associative_list (of types and types).
> std::vector -> mpl::type_list
> I'm at a loss for a decent naming convention though :(
From what I remember of your talk I see this as a struct with compile-time
associative lookup. I know "struct" isn't a glamorous name, but it does
connote constant-time (runtime) access to any element and the association of
an element with a name (the name is a type in this case). The one part not
covered at all by "struct" is the idea of iteration over the elements.
Anyway, it's not a solution, but maybe it leads to some ideas...
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk