/*
* Iterator
*/
- auto iter() const HB_AUTO_RETURN
+ auto iter () const HB_AUTO_RETURN
(
+ hb_array (items, mask + 1)
| hb_filter (&item_t::is_real)
| hb_map (&item_t::get_pair)
)
- auto keys() const HB_AUTO_RETURN
+ auto keys () const HB_AUTO_RETURN
(
- + iter()
+ + iter()
| hb_map (&hb_pair_t<K, V>::first)
)
while (!items[i].is_unused ())
{
if (items[i] == key)
- return i;
+ return i;
if (tombstone == (unsigned) -1 && items[i].is_tombstone ())
- tombstone = i;
+ tombstone = i;
i = (i + ++step) & mask;
}
return tombstone == (unsigned) -1 ? i : tombstone;
using map_pair_t = hb_item_type<hb_map_t>;
+ hb_iter (m)
- | hb_map ([] (map_pair_t p) { return p.first * p.second; });
+ | hb_map ([] (map_pair_t p) { return p.first * p.second; })
+ ;
- using map_key_t = decltype (*m.keys());
- + hb_iter (m.keys ())
- | hb_filter ([] (map_key_t k) { return k < 42; });
+ m.keys ();
+ using map_key_t = decltype (*m.keys());
+ + hb_iter (m.keys ())
+ | hb_filter ([] (map_key_t k) { return k < 42; })
+ ;
unsigned int temp1 = 10;
unsigned int temp2 = 0;