switch to snapshot/modelalloc versions of stl classes
[c11tester.git] / stl_wrappers.h
1 #ifndef STL_WRAPPERS_H
2 #define STL_WRAPPERS_H
3
4 #include <vector>
5 #include <list>
6 #include "mymemory.h"
7
8 template<typename _Tp >
9 class snap_vector:public std::vector<_Tp, SnapshotAlloc<_Tp> > {
10  public:
11  snap_vector() : std::vector<_Tp, SnapshotAlloc<_Tp> >() {
12         }
13  snap_vector(int __n) : std::vector<_Tp, SnapshotAlloc<_Tp> >(__n) {
14         }
15
16         SNAPSHOTALLOC
17 };
18
19 template<typename _Tp >
20 class model_vector:public std::vector<_Tp, ModelAlloc<_Tp> > {
21  public:
22         MEMALLOC
23 };
24
25 template<typename _Tp >
26 class snap_list:public std::list<_Tp, SnapshotAlloc<_Tp> > {
27  public:
28         SNAPSHOTALLOC
29 };
30
31 template<typename _Tp >
32 class model_list:public std::list<_Tp, ModelAlloc<_Tp> > {
33  public:
34  model_list() : std::list<_Tp, ModelAlloc<_Tp> >() {
35         }
36  model_list(int __n, _Tp t) : std::list<_Tp, ModelAlloc<_Tp> >(__n, t) {
37         }
38         MEMALLOC
39 };
40 #endif