-
Notifications
You must be signed in to change notification settings - Fork 4
/
xmap.h
35 lines (28 loc) · 870 Bytes
/
xmap.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef _XMAP_H
#define _XMAP_H
#include "stl_allocator.h"
#include <map>
// xmap uses a fix-block memory allocator
template <typename Key, typename Value, typename Alloc = stl_allocator<std::pair<const Key, Value>>>
using xmap = std::map<Key, Value, std::less<Key>, Alloc>;
template <typename Key, typename Value, typename Alloc = stl_allocator<std::pair<const Key, Value>>>
using xmultimap = std::multimap<Key, Value, std::less<Key>, Alloc>;
#if 0 // Deprecated
template<class _Kty,
class _Ty,
class _Pr = std::less<_Kty>,
class _Alloc = stl_allocator<std::pair<const _Kty, _Ty> > >
class xmap
: public std::map<_Kty, _Ty, _Pr, _Alloc>
{
};
template<class _Kty,
class _Ty,
class _Pr = std::less<_Kty>,
class _Alloc = stl_allocator<std::pair<const _Kty, _Ty> > >
class xmultimap
: public std::multimap<_Kty, _Ty, _Pr, _Alloc>
{
};
#endif
#endif