Boost logo

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…剔å½Ô…¸Áɽ٥‘”Í½µ”µ½É”¥¹™¼½¸Ñ¡”ÁÕÉÁ½Í”F†R7G'V7GW&P§–÷Rw&R'VÆ–F–ær†W&Sò&ö÷7Bä×VÇF”–æFW‚Ö–v‡B†VÇgW'F†W"âf÷ ¦–ç7Fæ6RÂF†—2—2Æ—7BÖÆ–¶R7G'V7GW&RV–6·’6V&6†&ÆR'¦–æFWƒ  ¢G—VFVb&ö÷7C£¦×VÇF•ö–æFW…ö6öçF–æW#À¢æöFRÀ¢–æFW†VEö'“À¢6WVVæ6VCÃâÀ¢÷&FW&VE÷Væ—VSÆÖVÖ&W#ÆæöFRÆ–çBÂfæöFS£¦–æFWƒãà¢à¢â–æFW†VDÆ–æ´Æ—7C°¢Bˆˆ[XZ[Š
Bˆˆ[™^Y[šÓ\Ý[^ÞÌKÌ_KÌŸKÌß_NˆÚÝÊ[
Nˆ™]\›ˆ ˆB‚[ÛËHÚ[\H˜[™ÛWØXØÙ\ÜÈ[™^ZYÚ™HÝY™šXÚ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