Subject: Re: [boost] Feed pointers to a container, however use the member of the data type which pointer refer to
Date: 2009-09-22 03:06:10
Hi, please refer to the name of the lib your post's about in the post's
line, like this: [multi_index].
è·¯ é escribiÃ³:
> Dear All:
> In the following codes, I feed the container with B*, however
> I user the member of B as the index. Can somebody explain to
> me how this work out? And It seems that if smart pointers
> are feeded into the container, it still works out.
> typedef boost::multi_index_container<
> BOOST_MULTI_INDEX_MEMBER(B, int, idx)
Yep, this is a feature provided by Boost.MultiIndex predefined key
to help users dealing with pointers and pointer-like elements, as
What's your particular concenr about this? Are you just puzzled that this
works out of the box, or are you interested in the internal mechanisms used
to implement the feature?
JoaquÃn M LÃ³pez MuÃ±oz
TelefÃ³nica, InvestigaciÃ³n y Desarrollo