Lines Matching refs:fn
123 // Call fn on every entry in the table. You may mutate the entries, but be very careful.
124 template <typename Fn> // f(T*)
125 void foreach(Fn&& fn) {
128 fn(&fSlots[i].val);
133 // Call fn on every entry in the table. You may not mutate anything.
134 template <typename Fn> // f(T) or f(const T&)
135 void foreach(Fn&& fn) const {
138 fn(fSlots[i].val);
259 // Call fn on every key/value pair in the table. You may mutate the value but not the key.
260 template <typename Fn> // f(K, V*) or f(const K&, V*)
261 void foreach(Fn&& fn) {
262 fTable.foreach([&fn](Pair* p){ fn(p->key, &p->val); });
265 // Call fn on every key/value pair in the table. You may not mutate anything.
266 template <typename Fn> // f(K, V), f(const K&, V), f(K, const V&) or f(const K&, const V&).
267 void foreach(Fn&& fn) const {
268 fTable.foreach([&fn](const Pair& p){ fn(p.key, p.val); });
313 // Call fn on every item in the set. You may not mutate anything.
314 template <typename Fn> // f(T), f(const T&)
315 void foreach (Fn&& fn) const {
316 fTable.foreach(fn);