|
Boost Users : |
Subject: Re: [Boost-users] multi_index:iterator_to complexity
From: Joaquin M Lopez Munoz (joaquin_at_[hidden])
Date: 2015-03-09 09:34:15
Matwey V. Kornilov <matwey.kornilov <at> gmail.com> writes:
> 09.03.2015 10:02, Joaquin M Lopez Munoz пиÑеÑ:
> >
> > iterator_to does not do any kind of search based on x, but takes a
> > reference to an element of the container and returns an iterator to
> > it (roughly speaking, converts an element pointer to a node pointer).
> > [...]
>
> As far as I understand, there should be some pointer magic, like the
> following
>
> struct node {
> T obj;
> ... // Rest
> };
>
> so given x, (node*)&x will point to the struct enveloping the object and
> should provide access to index-specific data to allow iterator
> incrementation and dereferencing. What kind of additional data is stored
> in node?
None. The thing is done via some careful casting (caհͼ
ÌѼÍÑ
ä)ݥѡ¥¸Ý¡
ÐÑ¡ÍÑ
¹
É
±±½Ý̽ȤèÑ¡¥Ì¥ÌÑ¡ä½°
б¥¹Ì(ØдØä
¹àÜ´ä̽½½ÍнµÕ±Ñ¥}¥¹à½Ñ
¥°½¥¹á}¹½}
͹¡ÁÀè()ÍÑ
Ñ¥¥¹á}¹½}
ͨɽµ}Ù
±Õ¡½¹ÍÐÙ
±Õ}ÑåÁ¨À¤)ì(ÉÑÕɸÍÑ
Ñ¥}
ÍÐñ¥¹á}¹½}
ͨø (É¥¹ÑÉÁÉÑ}
ÍÐñÁ½}Ù
±Õ}¡½±ÈñY
±Õø¨ø ¼¨ÍÑä¸È¸Äܨ¼(½¹ÍÑ}
ÍÐñÙ
±Õ}ÑåÁ¨ø¡À¤¤¤ì)ô()ѵÁ±
ÑñÑåÁ¹
µ9½±ÑåÁ¹
µY
±Õø)9½¨¹½}ɽµ}Ù
±Õ¡½¹ÍÐY
±Õ¨À¤)ì(ÑåÁÑåÁ¹
µ9½èé
±±½
ѽÉ}ÑåÁ
±±½
ѽÉ}ÑåÁì(ÉÑÕɸÍÑ
Ñ¥}
ÍÐñ9½¨ø (¥¹á}¹½}
ÍñY
±Õ±
±±½
ѽÉ}ÑåÁøèéɽµ}Ù
±Õ¡À¤¤ì)ô((ø]¡
Ð$Ý
¹Ð¥ÌѼչÉÍÑ
¹¥Ñ¡½±±½Ý¥¹½¥Ì½ÉÉÐ
¹Ý½ÉÌ(ø¥¸< Ĥè(ø(øl¸¸¹t(ø
ÕѼ¥Ðôµ
Á|¹ÐðÄø ¤¹¥¹¡ä¤ì(ø¥¡¥Ðôµ
Á|¹ÐðÄø ¤¹¹ ¤¤âÖòævWCÃâæFW&F÷%÷Fò¦BÖÖòævWCÃâæ&Vvâ°£âÐ ¥F226÷'&V7BæBv÷&·2âòâFFFöæÆÇÂ÷RÖvBvç@§FòW6R&ö¦V7BÂv627V6f6ÆÇFW6væVBf÷"6öçfW'FærFW&F÷'0¦&WGvVVâæF6W3 ¢WFòBÒÖòævWCÃâæfæB¶W°¢bBÒÖòævWCÃâæVæB°¢Öòç&ö¦V7CÃâBÖÖòævWCÃâæ&VvⰢР¥W&f÷&Öæ6R2vöærFò&RFR6ÖR÷"WfVâ&WGFW"bFR÷FÖ¦W"w0¦æ÷BFöòvööBÂæBF22&ö&&Ç6ÆV&W"à ¤¦ö\:ÖâÒÌ;7W¢×\;÷ ¥FVÆVl;6æ6
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net