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


On Wed, Jul 18, 2012 at 8:09 PM, Lubos Lunak <l.lunak@suse.cz> wrote:
 You didn't read further than that part above, did you?

 What you want is broken. It is definitely broken from the theoretical point
of view, since modifying the items may change the sort order.


Aaaaaargh. Instead of casting aspersions on my replies, how about you
actually read the o3tl::sorted_vector.hxx code and look at some of the
use-cases in the LO codebase.

What is broken is attempting to provide a level of protection that is
not useful in practice, mostly get bypassed, and does not play nice
with the C++ type-system.

Now, however, if you look at my original email, I make some
suggestions that will actually improve things.
For example, we can split the problem into 2 sub-use-cases
(a) sorted_vector_of_ptr_to_val
(b) sorted_vector_of_val
Then for each of these cases, we can apply some degree (but not a lot)
of const-protection

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.