Date: prev next · Thread: first prev next last
2014 Archives by date, by thread · List index


Hi,

On Sat, Mar 22, 2014 at 2:54 PM, Miklos Vajna <vmiklos@collabora.co.uk> wrote:
Nah, you just mentioned in general, that you would need a set (which is
a sorted container where the key is not separated from the value) which
has an operator[], and I believe map is just that.

He didn't say that. He said that the current implementation has
operator[] but it is used in iterations only, so instead of
operator[], a iterator (which std:set supports ofcourse) would be
enough to replace those cases.

Anyway.. sorted data structures usually use binary search for any
insert which is also currently used (I hope). The only problem is the
vector as for any insert to an arbitrary position it has to copy all
succeeding elements, which can get slow when the number of elements
increases. But if this happens infrequently and the number of elements
is low, it just doesn't really matter.

Regards, Tomaž

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.