On 07/18/2012 08:09 PM, Lubos Lunak wrote:
What you want is broken. It is definitely broken from the theoretical point
of view, since modifying the items may change the sort order.
While one can argue that it is broken, in practice I would not bother
trying too hard to make the code safe
On Wednesday 18 of July 2012, Noel Grandin wrote:
On Wed, Jul 18, 2012 at 8:09 PM, Lubos Lunak l.lu...@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
On Thursday 19 of July 2012, Stephan Bergmann wrote:
On 07/18/2012 08:09 PM, Lubos Lunak wrote:
What you want is broken. It is definitely broken from the theoretical
point of view, since modifying the items may change the sort order.
While one can argue that it is broken, in practice I
On Wed, Jul 18, 2012 at 7:23 PM, Lubos Lunak l.lu...@suse.cz wrote:
But it is correct that you get an error in the second case and you ideally
should be getting one in the first case as well. You cannot modify the
elements of the vector because that might modify what defines their position
On Wednesday 18 of July 2012, Noel Grandin wrote:
On Wed, Jul 18, 2012 at 7:23 PM, Lubos Lunak l.lu...@suse.cz wrote:
But it is correct that you get an error in the second case and you
ideally should be getting one in the first case as well. You cannot
modify the elements of the vector
On Wed, Jul 18, 2012 at 8:09 PM, Lubos Lunak l.lu...@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.
Aargh. Instead of casting
Hi
So David and Stephan recommended that I make the accessor methods to
o3tl::sorted_vector const in order to prevent clients from invalidating
the sorted-ness of it.
This works out fine when I'm storing pointers to something in the
sorted_vector like this:
struct SomeStruct {
int xxx;
On Wednesday 18 of July 2012, Noel Grandin wrote:
Hi
So David and Stephan recommended that I make the accessor methods to
o3tl::sorted_vector const in order to prevent clients from invalidating
the sorted-ness of it.
This works out fine when I'm storing pointers to something in the