c++ - Is there any standard delete functor? -
i looking functor deletes argument:
template<class t> struct delete_functor { void operator()(t* p) { delete p; } };
is there in std
, tr1
or boost
?
c++0x add std::default_delete
standard library support std::unique_ptr
.
it has same functionality delete_functor
, specialized call delete[]
array type objects.
Comments
Post a Comment