Is there any standard delete functor?

Posted by FredOverflow on Stack Overflow See other posts from Stack Overflow or by FredOverflow
Published on 2010-04-27T19:33:04Z Indexed on 2010/04/27 19:33 UTC
Read the original article Hit count: 210

Filed under:
|
|

I am looking for a functor that deletes its argument:

template<class T>
struct delete_functor
{
    void operator()(T* p)
    {
        delete p;
    }
};

Is there something like this in std, tr1 or boost?

© Stack Overflow or respective owner

Related posts about c++

Related posts about delete