Boost logo

Boost :

From: Phil Bouchard (philippe_at_[hidden])
Date: 2008-03-28 05:31:27


Greetings:

Ok, this a nice feature that just got added to the pointer. I just added
support for "void" pointers and works perfectly. We can see the object
being deleted correctly after the shifted_ptr<void> is destructed.

Furthermore a very nice property shifted_ptr_base has is that it can be
casted to a regular pointer and back again to a shifted_ptr_base and the
pointee will still be correctly deallocated. I never saw any production
code using perfect C++ coding and sometimes it happens we rely on "working
undefined behaviors".

Multithreaded support has been added but unfortunately I didn't see any
function returning the current thread id. Was this disregarded?

Finally I am using cleaner preprocessor coding for variadic function
templates:
http://www.boost-consulting.com/vault/index.php?action=downloadfile&filename=shifted_ptr.zip&directory=Memory&

Thanks,
-Phil


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