summaryrefslogtreecommitdiff
path: root/src/stl-utils.h
blob: a48b7d5dcb43222f3ad8459952e9ee8a721470e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#ifndef STLUTILS_H_
#define STLUTILS_H_

template<class T>
struct del_fun_t 
{
   del_fun_t& operator()(T* p) { 
     delete p;
     return *this;
   }
};

template<class T>
del_fun_t<T> del_fun() 
{ 
   return del_fun_t<T>(); 
}

#endif
contact: Jan Huwald // Impressum