Boost logo

Boost :

Subject: Re: [boost] [unordered] [MultiIndex] iterator_to
From: joaquin_at_[hidden]
Date: 2008-11-27 09:34:38

Gordon Woodhull escribió:
>>> 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.
> I'd like to point out that there is also
> intrusive::detail::parent_from_member, which Ion and I have proposed
> to move into boost::detail as I think I need it for a fusion-intrusive
> adapter. (
> There is some scary code in parent_from_member but AFAIK it works
> everywhere.

Not everywhere, I'm afraid:

There are definitely some seriously non-standard tricks there that
should IMHO
discourage us from using parent_from_member unrestrictedly, useful as
this utility
may be.

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo

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