|
Boost : |
From: Joaquin M Lopez Munoz (joaquin_at_[hidden])
Date: 2006-04-26 18:29:35
Joaquin M Lopez Munoz <joaquin <at> tid.es> writes:
> Hello,
>
> With a little imagination, you can use Boost.MultiIndex,
> and specially the key extraction framework it provides,
> to achieve something similar to what you want (if I'm
> getting you right):
A small update: actually, you can write type_info_extractor
in a more direct way:
template<typename Base>
struct type_info_extractor
{
typedef std::type_info result_type;
const std::type_info& operator()(const Base& x)const
{
return typeid(x);
}
};
because composite_key<> takes care itself of the
chained ptr dereferencing stuff needed to go
from shared_ptr<A> to const A&.
JoaquÃn M López Muñoz
Telefónica, Investigación y Desarrollo
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk