"Greg Colvin" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I notice that a special operator new must be used
> to create objects pointed to by shifted_ptr.  Is
> this really necessaty?  It prevents shifted_ptr
> from just being an alternative implementation of
> shared_ptr.

The only difference consist of adding (so) when using operator new.  This is
the only "cost" of using shifted_ptr:
shared_ptr<int> p = new int(9);

shifted_ptr<int> p = new (so) int(9);

There are low level solutions for this but for now, let's keep it C++
oriented.  I'll take a look at other policy based pointers at the same time.



Philippe A. Bouchard




_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to