Whitespace

This commit is contained in:
Behdad Esfahbod 2019-05-08 14:46:55 -07:00
parent a17f0fa3a1
commit f5705d7656
2 changed files with 12 additions and 9 deletions

View File

@ -210,14 +210,14 @@ struct hb_hashmap_t
/*
* 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()
| hb_map (&hb_pair_t<K, V>::first)

View File

@ -208,11 +208,14 @@ main (int argc, char **argv)
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; })
;
m.keys ();
using map_key_t = decltype (*m.keys());
+ hb_iter (m.keys ())
| hb_filter ([] (map_key_t k) { return k < 42; });
| hb_filter ([] (map_key_t k) { return k < 42; })
;
unsigned int temp1 = 10;
unsigned int temp2 = 0;