|
Boost Users : |
Subject: Re: [Boost-users] [multi_index_container] Using equal_range with hashed indices
From: Joaquin M LópezMuñoz (joaquin_at_[hidden])
Date: 2015-09-28 02:17:33
Muruganand Karthikeyan <muruthegun <at> gmail.com> writes:
> Hello!
>
> std::equal_range requires that the container be pre-sorted
> (http://www.cplusplus.com/reference/algorithm/equal_range/)
> How does multi-index container handle this scenario with respect
> to hashed non-unique indices.
Hashed indices' equal_range works on sequences that have no
particular order (other than equivalent elements being adjacent),
which is fine because it does *not* use std::equal_range internally
but its own logic (much as, say, std::unordered_set::equal_range).
> The reason I ask is since I'm facing a situation with equal_range.
> Please see below code -
>
> [...]
> typedef UserIdContainer::index<id1_id2>::type IndexById1Id2;
> typedef IndexById1Id2::const_iterator á å%Å%É}¥Ðì(øÍÑèéÁ
¥Èñ%¹á å%Å%É}¥Ð°%¹á å%Å%É}¥Ðø¹ÑÉ¥Ìô(ø¥¹á å%Å%ȹÅÕ
±}É
¹¡µ
}ÑÕÁ±¡¥Å}Ù
°°¥É}Ù
°¤¤ì(ø(ø$´Í¥¹Ñ¡
ЩͽµÑ¥µÌ¨¹Ñɥ̹¥ÉÍÐÅÕ
±Ì¥¹á å%Å%ȹ¹ ¤(ø
¹¹Ñɥ̹ͽ¹½Ì¹½ÐÅÕ
°¥¹á å%Å%ȹ¹ ¤¸Q¡±½½ÕÀ¥Ì(øÙ
±¥´µ
¹¥¹$ÙÙÉ¥¥Ñ¡
ÐÑ¡É¥Ì
е±
Íн¹¹ÑÉäÝ¡¥ (øÍ¡½Õ±
Õ¡ÐäÑ¡ÅÕ
±}É
¹¸()É
¹m±¤Ý¡Éôõ¹
¹õ¹¥Ì¥¹Ù
±¥¸Ì
È
Ì$
¸Í°)Ñ¡¥Ìµ
¹ÌÑ¡
Ð((¨e½ÕȽ¡
Ìͽµ¡½Üɽ¸Ñ¡¥¹Ñɹ
±Ì½Ñ¡½¹Ñ
¥¹È°(¨½È ½½Íй5ձѥ%¹à¡
ÌÕ¸()
¸å½Ô¥Í½±
ѽ¹
ÍÝ¡Éå½Ô½ÍÉÙÑ¡
¹½µ
±½ÕÌ¡
Ù¥½È)¥¹Ñ¼½µÁ±ÑÑÍÐ͹¥ÁÁÐ$
¸Ñ
񫫪
Ðü()Q¡
¹¬å½Ô())½
Å×µ¸43ÍÁè5׎è)Q±Í¹¥
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