Boost logo

Boost :

Subject: Re: [boost] [unordered] [MultiIndex] iterator_to
From: David Abrahams (dave_at_[hidden])
Date: 2008-11-23 15:14:46

on Tue Nov 18 2008, "Daniel James" <> wrote:

> Sorry about the slow reply.
> 2008/11/10 David Abrahams <dave_at_[hidden]>:
>> If I could prevail upon Daniel James to add iterator_to to
>> Boost.Unordered so it will be there in the future, I'd gladly backport
>> that change into my version
> I'm not sure if it's that simple. The nodes aren't PODs so I don't
> think 'offsetof' can't be used to get their address (or can it? I've
> never used it).

No, not without making them PODs.

> MultiIndex copes by using aligned_storage and manually constructing
> the value in place, so that it can get the containing structures
> address. Which is a possibiliy for the unordered containers, and could
> help implement emplace for compilers without variadic templates (or
> for allocators without a variadic construct method) so it might be a
> good idea anyway. So I'll look into doing that.

Yeah, I think that's what all containers should be doing anyhow.

Dave Abrahams
BoostPro Computing

Boost list run by bdawes at, gregod at, cpdaniel at, john at