blob: 3baa1c19dd854655a6fe3091fd3a35c275aadb62 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#ifndef TL_FILE_ALLOCATOR_HPP
#define TL_FILE_ALLOCATOR_HPP
template <class T>
class allocator_default
{
public:
static T *alloc() { return new T; }
static void free(T *p) { delete p; }
static T *alloc_array(int size) { return new T [size]; }
static void free_array(T *p) { delete [] p; }
};
#endif // TL_FILE_ALLOCATOR_HPP
|