This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Paolo Carlini wrote:
Thanks for the explanation. Indeed, now I understand: unconsciously I
was considering the map/set case, *not* the multimap/multiset case. Only
in latter case you see clearly the difference and your pseudocode is ok
for *both*.
Well, not completely. I mean, my mistake ultimately is that your discussion is focused on multimap/multiset, whereas we (libstdc++-v3) have to improve our code wrt before/after also in case of map/set...
Note: The "as close as possible to hint" rule has no effect on the algorithms used to insert into containers with unique keys. When x does not yet exist in a container, lower_bound, upper_bound and "insert without hint" all refer to the same location. And when x does already exist in a unique-key container, no insertion is performed.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |