map.h
Go to the documentation of this file.
1 
10 #pragma once
11 #include "interop/config.h"
12 
13 #ifdef HAVE_UNORDERED_MAP_IN_STD
14 # define INTEROP_HAS_UNORDERED_MAP 1
15 # include <map>
16 # include <unordered_map>
17 # define INTEROP_ORDERED_MAP(key_t, value_t) std::map<key_t, value_t>
18 # define INTEROP_UNORDERED_MAP(key_t, value_t) std::unordered_map<key_t, value_t>
19 # define INTEROP_UNORDERED_HASHMAP(key_t, value_t, hash_t) std::unordered_map<key_t, value_t, hash_t>
20 # define INTEROP_CLEAR_MAP(map_ins) offset_map_t empty_map_to_clear;std::swap(map_ins, empty_map_to_clear);
21 #else
22 # include <map>
23 # define INTEROP_ORDERED_MAP(key_t, value_t) std::map<key_t, value_t>
24 # define INTEROP_UNORDERED_MAP(key_t, value_t) std::map<key_t, value_t>
25 # define INTEROP_UNORDERED_HASHMAP(key_t, value_t, hash_t) std::map<key_t, value_t>
26 # define INTEROP_CLEAR_MAP(map_ins) map_ins.clear();
27 #endif