Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- typedef tr1::unordered_map hashmap;
- typedef map hashmap;
- map<string, string>
- map<string, int>
- map <string, map<string,int>> ..etc
- template <typename Key, typename T>
- struct hashmap {
- typedef std::unordered_map<Key, T> type;
- // or
- //typedef std::map<Key, T> type;
- };
- hashmap<int, float>::type some_map;
- template <typename T1, typename T2>
- struct hashmap
- {
- typedef std::map<T1, T2> type;
- };
- #ifdef HAVE_TR1
- #include <tr1/unordered_map>
- #define HASH_MAP std::tr1::unordered_map
- #else
- #include <map>
- #define HASH_MAP std::map
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement