From: David B. Held (dheld_at_[hidden])
Date: 2002-07-16 01:01:01
"Philippe A. Bouchard" <philippeb_at_[hidden]> wrote in message
Is the LGPL compatible with Boost licensing requirements? I'm not sure.
Some people say leading underscore names are not recommended,
because they tend to be close to reserved names. I'm no expert on smart
pointers, but it seems that std::auto_ptr could easily have taken this
route. My question is: why did it not?
> - functionality is similar to boost::shared_ptr<> except:
Actually, it's not remotely like boost::shared_ptr<>. It doesn't support
custom deleters or void pointers. It doesn't work with weak or intrusive
pointers. And it doesn't provide operator! or a bool test operator. It
also doesn't interoperate with std::auto_ptr or boost::scoped_ptr.
> - reference counters are merged with instanciated objects:
> - operator new () is called once in the end (like
Except that you call a copy c'tor, which prevents you from using the
class with non_copyable objects, and imposes a penalty on expensive-
copy types. And the construction syntax is awkward.
> - the pointer is same size as sizeof(void *);
So is boost::intrusive_ptr, if I recall correctly.
> - reference counters are not copied when assignments are
> - little drawback: assignments work only with other
> - the only change from std::auto_ptr<> interface was that release()
> renamed to share();
> - faster than boost::shared_ptr<>.
But only because it has a small subset of boost::shared_ptr's functionality
> I hope someone will share the same vision of efficienty benefits I have.
I think there are certainly cases where efficiency is important. However,
most people agree that the proliferation of smart pointer types is a
Getting people to toss another one in their toolbox might be a challenge. ;)
Also, you have a name clash. I don't think the current boost::shared_ptr
is going to get deprecated in favor of your design. ;)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk