19 template<
typename K,
typename V>
38 size_type pos = keys_.
find(key);
39 if(pos == keys_.
end()) {
46 size_type pos = keys_.
find(key);
47 if(pos == keys_.
end()) {
54 size_type pos = keys_.
find(key);
55 ASSERT_MSG(pos != keys_.
end(),
"key not found in unordered_map");
58 V
const &
at(K
const &
key)
const {
59 size_type pos = keys_.
find(key);
60 ASSERT_MSG(pos != keys_.
end(),
"key not found in unordered_map");
65 size_type pos = keys_.
find(key);
66 if(pos == keys_.
end()) {
75 for(size_type
i = 0;
i < keys_.
size(); ++
i) {
76 os <<
F(
"{") << keys_[
i] <<
F(
": ") << vals_[
i] <<
F(
"}");
77 if(
i != keys_.
end() - 1)
82 template<
typename Archive>
V & operator[](K const &key)
Definition: unordered_map.hpp:37
V const & operator[](K const &key) const
Definition: unordered_map.hpp:45
void print(S &os) const
Definition: unordered_map.hpp:73
size_type const & end() const
Definition: vector.hpp:163
V const & at(K const &key) const
Definition: unordered_map.hpp:58
unordered_map(unordered_map const &arg)
Definition: unordered_map.hpp:28
void serialize(Archive &ar)
Definition: unordered_map.hpp:83
unordered_map & operator=(unordered_map const &rhs)
Definition: unordered_map.hpp:30
V value_type
Definition: unordered_map.hpp:24
size_type const & size() const
Definition: vector.hpp:110
#define ASSERT_MSG(exp, msg)
Definition: ard_assert.hpp:34
void push_back(T const &in)
Definition: vector.hpp:50
Definition: vector.hpp:21
unordered_map()
Definition: unordered_map.hpp:26
Definition: unordered_map.hpp:20
bool contains(K const &key) const
Definition: unordered_map.hpp:64
V & at(K const &key)
Definition: unordered_map.hpp:53
key
Definition: hid_keys.hpp:14
size_type find(T const &val, size_type pos=0) const
Definition: vector.hpp:61
#define F(x)
Definition: ustd_generic.hpp:15
K key_type
Definition: unordered_map.hpp:23