« Return to Thread: Multi Index Container - key extractor on a member of a member

Re: Multi Index Container - key extractor on a member of a member

by Joaquin M Lopez Munoz :: Rate this Message:

Reply to Author | View in Thread



----- Mensaje original -----
De: Avi Revivo <revivoavi@...>
Fecha: Martes, Diciembre 25, 2007 7:47 am
Asunto: Re: [boost] Multi Index Container - key extractor on a member
of a member
Para: boost@...

>
> Thank you very much for the fast reply,
>
> If i have no problem adding a function that returns the value to
> sort by (e.g. long GetClientId) and i use
> BOOST_MULTI_INDEX_CONST_MEM_FUN define key extractor.
>
> Would you suggest i use BOOST_MULTI_INDEX_CONST_MEM_FUN,write my
> own custom key extractor or it does not matter in terms of
> performance (or anythingelse)?

>From the point of view of performance there shouldn't be
any difference between both approaches. So I guess it's a
matter of taste; I'd go for the custom extractor if
using BOOST_MULTI_INDEX_CONST_MEM_FUN somehow forces you
to change the design of your class or looks forced.

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

 « Return to Thread: Multi Index Container - key extractor on a member of a member