Home | History | Annotate | Download | only in decpp

Lines Matching refs:map

73 // Utilities for map-like container types
77 const typename M::mapped_type* tryLookup (const M& map,
80 typename M::const_iterator it = map.find(key);
81 if (it == map.end())
88 const typename M::mapped_type& lookupDefault (const M& map,
92 const typename M::mapped_type* ptr = tryLookup(map, key);
99 const typename M::mapped_type& lookup (const M& map, const typename M::key_type& key)
101 const typename M::mapped_type* ptr = tryLookup(map, key);
103 throw std::out_of_range("key not found in map");
107 //! Map `key` to `value`. This differs from `map[key] = value` in that there
110 bool insert (M& map, const typename M::key_type& key, const typename M::mapped_type& value)
113 std::pair<typename M::iterator,bool> ret = map.insert(entry);