Opened 14 years ago
Last modified 12 years ago
#1913 new Feature Requests
Null deleter for shared_ptr
Reported by: | Owned by: | Peter Dimov | |
---|---|---|---|
Milestone: | To Be Determined | Component: | smart_ptr |
Version: | Boost 1.35.0 | Severity: | Cosmetic |
Keywords: | smart_ptr null deleter | Cc: |
Description
As raised in this (http://article.gmane.org/gmane.comp.lib.boost.user/35693) message on the boost-users mailing list, it would be very nice if the smart pointer library contained a null deleter object so it could be used for stack/static objects. To save the user having to define their own.
Attachments (1)
Change History (5)
comment:1 by , 14 years ago
Milestone: | Boost 1.36.0 → Boost 1.37.0 |
---|---|
Status: | new → assigned |
comment:2 by , 14 years ago
Milestone: | Boost 1.37.0 → To Be Determined |
---|
comment:3 by , 12 years ago
Status: | assigned → new |
---|
comment:4 by , 12 years ago
by , 10 years ago
Attachment: | PATCH.null_deleter.diff added |
---|
makes null_deleter available from boost/smart_ptr/null_deleter.hpp, minimal docs & test case
Note:
See TracTickets
for help on using tickets.
This ticket is raised against version 1.35.0 At least in 1.42 there is one hidden away in boost::serialization. It is difficult to know though why it is there:
#include <boost/serialization/shared_ptr.hpp>
class Foo
{
};
Foo foo; boost::shared_ptr<Foo> sharedfoo( &foo, boost::serialization::null_deleter() );