libcommonc++
0.7
|
A functor that deletes its argument. More...
#include <DeleteFunctor.h++>
Public Member Functions | |
template<typename T > | |
void | operator() (T *obj) const |
A functor that deletes its argument.
May be used as an argument to the for_each
algorithm to delete elements of a pointer-based collection. For example:
std::vector<Foo *> vec;
std::for_each(vec.begin(), vec.end(), DeleteFunctor()); vec.clear();
|
inline |