
26 Apr
2006
26 Apr
'06
10:29 p.m.
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