Thea
Map.hpp
1 //============================================================================
2 //
3 // This file is part of the Thea toolkit.
4 //
5 // This software is distributed under the BSD license, as detailed in the
6 // accompanying LICENSE.txt file. Portions are derived from other works:
7 // their respective licenses and copyright information are reproduced in
8 // LICENSE.txt and/or in the relevant source files.
9 //
10 // Author: Siddhartha Chaudhuri
11 // First version: 2011
12 //
13 //============================================================================
14 
15 #ifndef __Thea_Map_hpp__
16 #define __Thea_Map_hpp__
17 
18 #include "Platform.hpp"
19 #include <map>
20 
21 namespace Thea {
22 
24 template < typename Key,
25  typename T,
26  typename Compare = std::less<Key>,
27  typename Alloc = std::allocator< std::pair<Key const, T> >
28  > using Map = std::map<Key, T, Compare, Alloc>;
29 
31 template < typename Key,
32  typename T,
33  typename Compare = std::less<Key>,
34  typename Alloc = std::allocator< std::pair<Key const, T> >
35  > using MultiMap = std::multimap<Key, T, Compare, Alloc>;
36 
37 } // namespace Thea
38 
39 #endif
Root namespace for the Thea library.
std::map< Key, T, Compare, Alloc > Map
Maps keys to values.
Definition: Map.hpp:28
std::multimap< Key, T, Compare, Alloc > MultiMap
Maps (possibly duplicate) keys to values.
Definition: Map.hpp:35
This file must be included in every file in the project, before any other include.