Lines Matching defs:map
75 // Utilities for map-like container types
79 const typename M::mapped_type* tryLookup (const M& map,
82 typename M::const_iterator it = map.find(key);
83 if (it == map.end())
90 const typename M::mapped_type& lookupDefault (const M& map,
94 const typename M::mapped_type* ptr = tryLookup(map, key);
101 const typename M::mapped_type& lookup (const M& map, const typename M::key_type& key)
103 const typename M::mapped_type* ptr = tryLookup(map, key);
105 throw std::out_of_range("key not found in map");
109 //! Map `key` to `value`. This differs from `map[key] = value` in that there
112 bool insert (M& map, const typename M::key_type& key, const typename M::mapped_type& value)
115 std::pair<typename M::iterator,bool> ret = map.insert(entry);