On Mon, May 12, 2008 at 8:26 PM, Peter Dimov <pdimov@pdimov.com> wrote:
Kevin Martin:
> My question is whether the boost library has anywhere in it a null
> deleter object, or whether it is possible to define one in place with
> boost::lambda or similar?

boost::lambda::_1 should work as a null deleter, although you're right that
we might wish to add boost::null_deleter. Can you please file a Trac ticket
for this?

Just a small note. It can be pretty expensive to use a shared_ptr for stack objects.
shared_ptr allocates a shared_counter on heap and shared_ptr uses by default thread safe locking.
If you can pass stack objects as shared_ptr instanses, why can't you pass them as references?

Thanks,
Ovanes