Boost logo

Boost :

From: David B. Held (dheld_at_[hidden])
Date: 2003-01-15 17:30:39


"Philippe A. Bouchard" <philippeb_at_[hidden]> wrote in message
news:b04jar$uv4$1_at_main.gmane.org...
> I have renamed placed_ptr<> to shifted_ptr<> and added a placed
> operator new (size_t, gc) that can be used with shared_ptr<>:
> http://groups.yahoo.com/group/boost/files/shifted_ptr/
>
> I agree that shifted_ptr<> makes more sense. Thanks Dave.

The comparison with shared_ptr<> isn't fair. Your ptr has no locking
for thread safety. Try defining BOOST_DISABLE_THREADS and
re-running the tests, or you risk just measuring the speed of thread sync.
Also, I don't see the source for your test. Why don't you include that, so
people can compile and run it under different compilers and platforms?
Furthermore, I don't see any documentation, except for what few
comments exist in the source. It isn't clear where you expect people to
use your pointer, or if there are usages that should be discouraged. You
don't mention any gotchas that might occur. These are things that should
appear in the docs (which you will certainly need if you intend to submit it
for review). Basically, it's hard to comment on your design without
spending a lot of time reviewing the code. Docs would help. ;)

Dave


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