Boost logo

Boost :

Subject: Re: [boost] [interprocess] [bimap] Using raw pointers
From: Matias Capeletto (matias.capeletto_at_[hidden])
Date: 2013-01-27 03:02:34


On Sat, Jan 26, 2013 at 8:50 AM, Ion Gaztañaga <igaztanaga_at_[hidden]> wrote:
> El 26/01/2013 7:32, Matias Capeletto escribió:
>> But now I looked better at MultiIndex implementation and it is
>> actually pushing the index as part of the main container hierarchy
>> using CRTP to access the core, something I thought about yesterday
>> also. I think I will end up doing the same for Bimap then.
>
> That's quite clever ;-) I think it's a good solution for your problem.

Well, unfortunately, I am back to square one. Again, I will not have
any problem if the views will be accessed from a left() and right()
functions but I can not find a way to get from the view data member to
the core that is not undefined in C++. For reference, I have to get
from the left data member to the bimap parent:

  class bimap { ... left_map_view left; ... } ;

Any attempt to use the offset of the member to get to the bimap class
seems to be forbidden by the standard.
So, I am back to using offset_ptr for the map_view data members and
maybe at one point think about migrating to function-accessed views to
avoid it :(

Best regards
Matias


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk