|
Boost Users : |
Subject: Re: [Boost-users] Pointer to objects in Boost.MultiIndex
From: Joaquin M Lopez Munoz (joaquin_at_[hidden])
Date: 2015-12-30 05:50:37
Amit Prakash Ambasta <amit.prakash.ambasta <at> gmail.com> writes:
>
> Consider the following code snippet:
>
> [...]
>
> struct LinkList;
>
> struct LinkList {
> Â Â size_t index;
> Â Â LinkList* parent;
> Â Â LinkList(size_t index, LinkList* parent) :
> index(index), parent(parent) {}
> };
>
> struct llindex {};
>
> typedef ordered_unique<
> tag<llindex>, member<LinkList, size_t, &LinkList::index>
> > LinkListIndex;
> typedef boost::multi_index_container<
> LinkList, indexed_by<LinkListIndex>
> > IndexedLinkList;
>
> [...]
>
> int main() {
> Â Â IndexedLinkList ill;
> Â Â auto &index_ll = ill.get<0>();
>
> Â Â ill.insert(LinkList{0, nullptr});
> Â Â ill.insert(LinkList{1, (LinkList*)(&(*index_ll.find(0)))});
>  ¥±°¹¥¹ÍÉС1¥¹1¥ÍÑìÈ°¡1¥¹1¥ÍШ¤ ©¥¹á}±°¹¥¹ À¤¤¥ô¤ì(ø
¥±°¹¥¹ÍÉС1¥¹1¥ÍÑìÌ°¡1¥¹1¥ÍШ¤ ©¥¹á}±°¹¥¹ Ȥ¤¥ô¤ì(ø(ø
Í¡½Ü¡¥±°¤ì(ø
ÉÑÕɸÀì(øô(ø(ø(ø]½Õ±¡1¥¹1¥ÍШ¤ ©¥¹á}}±°¹¥¹¡Ù
±Õ¤¤¤Ñ¡É½µµ¹Ý
ä(øÑ¼Ñ Ñ¡Á½¥¹ÑÈѼÁ
ɹÐü()Á¹Ì½¸Ñ¡½¹Ñáи%å½ÔÉ¥¹ÍÉÑ¥¹Ñ¡±µ¹ÑÌ¥¸ÍÅչѥ
°)½ÉÉ¥¹¡¤¹¸Ñ¡¹Ý±ä¥¹ÍÉѱµ¹Ð¥Ì±¥¹Ñ¼Ñ¡±
Íн¹¤°)Ñ¡¸Ñ¡¥Ì¥Ì
ÍÑÈ
Ìå½Ô½¸Ð¼
¹ä±½½ÕÀè((
ÕѼ¥Ðõ¥±°¹¥¹ÍÉС1¥¹1¥ÍÑìÀ°¹Õ±±ÁÑÉô¤¹¥ÉÍÐì(¥Ðõ¥±°¹¥¹ÍÉС1¥¹1¥ÍÑìÄ°¡1¥¹1¥ÍШ¤ ©¥Ð¥ô¤¹¥ÉÍÐì(¥Ðõ¥±°¹¥¹ÍÉС1¥¹1¥ÍÑìÈ°¡1¥¹1¥ÍШ¤ ©¥Ð¥ô¤¹¥ÉÍÐì(¥Ðõ¥±°¹¥¹ÍÉС1¥¹1¥ÍÑìÌ°¡1¥¹1¥ÍШ¤ ©¥Ð¥ô¤¹¥ÉÍÐì()5
åå½Ô
¸Áɽ٥ͽµµ½É¥¹¼½¸Ñ¡ÁÕÉÁ½ÍFR7G'V7GW&P§÷Rw&R'VÆFærW&Sò&ö÷7Bä×VÇFæFWÖvBVÇgW'FW"âf÷ ¦ç7Fæ6RÂF22Æ7BÖƶR7G'V7GW&RV6·6V&6&ÆR'¦æFW ¢GVFVb&ö÷7C£¦×VÇFöæFW
ö6öçFæW#À¢æöFRÀ¢æFWVEö'À¢6WVVæ6VCÃâÀ¢÷&FW&VE÷VæVSÆÖVÖ&W#ÆæöFRÆçBÂfæöFS£¦æFWãà¢à¢âæFWVDÆæ´Æ7C°¢B[XZ[
BÂ[^Y[Ó\Ý[^ÞÌKÌ_KÌKÌß_NÂÚÝÊ[
NÂ]\ÂB[ÛËHÚ[\H[ÛWØXØÙ\ÜÈ[^ZYÚHÝYXÚY[Y[ÝHÛBØ[ÈÛÝÈHÜÚ][ÛÙH[[Y[[XØÙ\ÜÈHÜÚ][Û[ÛÛÝ[[YKØ\]pë[H0ìÜ^]pì[Þ[Y°ìÛ
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