Boost logo

Boost :

Subject: Re: [boost] [Shifted Pointer] Review Request
From: Phil Bouchard (philippe_at_[hidden])
Date: 2011-04-22 02:17:34

On 4/21/2011 10:53 PM, GMan wrote:
> I haven't looked too deeply into it, but this syntax seems scary:
> shifted_ptr<int> v = new shifted<int>(11);
> Is there a way to hide that detail? Perhaps construct with values which
> internally store shifted<T> from that value? Just seems error prone
> and unintuitive.

You are referring to intrusive members and this is the approach taken by
intrusive_ptr<>. Intrusive members become a problem when multiple
inheritance is used and/or virtual inheritance because the intrusive
member might or might not be duplicated in the object.

Perhaps an abbreviation can be used but for now this is the price to pay
to use Shifted Pointer.


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