14 Apr
2009
14 Apr
'09
5:52 a.m.
Dominique Devienne escribió:
Hi. I'm trying to use a shared_ptr as the value_type of a multi_index_container, but I'm not having any success with the key extractors (VS2005, 1.38).
[...] ordered_unique< BOOST_MULTI_INDEX_CONST_MEM_FUN( shared_ptr<Foo>, const Uid&, uid ) >
Replace the declaration above with ordered_unique< BOOST_MULTI_INDEX_CONST_MEM_FUN( Foo, const Uid&, uid )
That is, you must specifiy keys as if there weren't any intervening pointers --dereferencing is taken care of automatically by Boost.MultiIndex predefined extractors. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo