Boost logo

Boost Users :

Subject: Re: [Boost-users] [unordered] order in container
From: Daniel James (daniel_at_[hidden])
Date: 2013-06-14 14:55:28


On 14 June 2013 16:49, Anthony Foiani <tkil_at_[hidden]> wrote:
>> // uset1: 8, 9, 10
>> // uset2: 10, 9, 8
>
> The reality is that the storage for uset1 and uset2 probably look more
> like this:
>
> uset1: 10, 8, 9
> uset2: 10, 8, 9

It used to, but now Boost.Unordered stores elements in a single
singly-linked list in order to get o(1) iteration. When inserting into
an empty bucket the element is inserted at the beginning of the list.
But please don't rely on that.


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