Boost logo

Boost Users :

Subject: Re: [Boost-users] [general] is there a noop deallocator in boost?
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2011-03-07 17:45:05


It is probably a good thing that there isn't a null_deleter in Boost,
after all it's just a single line of code that is difficult to mess
up:

struct null_deleter { template <class T> void operator()(T*) { } };

Emil Dotchevski
Reverge Studios, Inc.
http://www.revergestudios.com/reblog/index.php?n=ReCode

On Mon, Mar 7, 2011 at 2:33 PM, Igor R <boost.lists_at_[hidden]> wrote:
>> I'm interested in a noop deallocator for use in shared_ptr, but can't find
>> one in boost, so does anyone know of one?  (I know it's trivial to write
>> one, but that doesn't out weight the convenience of using a standardized
>> one.)
>
> Well, as far as I see, there's a ticket opened 3 years ago:
> https://svn.boost.org/trac/boost/ticket/1913
> And there are several copies of null_deleter in various libraries, eg.
> in boost::serialization, boost::signals2, etc.
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net