[map] Add initializer_list and swap()
diff --git a/src/hb-map.hh b/src/hb-map.hh
index d7b20f3..45bd3cb 100644
--- a/src/hb-map.hh
+++ b/src/hb-map.hh
@@ -47,6 +47,12 @@
   hb_hashmap_t& operator= (const hb_hashmap_t&& o)  { hb_copy (o, *this); return *this; }
   hb_hashmap_t& operator= (hb_hashmap_t&& o)  { hb_swap (*this, o); return *this; }
 
+  hb_hashmap_t (std::initializer_list<hb_pair_t<K, V>> lst) : hb_hashmap_t ()
+  {
+    for (auto&& item : lst)
+      set (item.first, item.second);
+  }
+
   static_assert (hb_is_integral (K) || hb_is_pointer (K), "");
   static_assert (hb_is_integral (V) || hb_is_pointer (V), "");
 
@@ -336,7 +342,22 @@
 struct hb_map_t : hb_hashmap_t<hb_codepoint_t,
 			       hb_codepoint_t,
 			       HB_MAP_VALUE_INVALID,
-			       HB_MAP_VALUE_INVALID> {};
+			       HB_MAP_VALUE_INVALID>
+{
+  using hashmap = hb_hashmap_t<hb_codepoint_t,
+			       hb_codepoint_t,
+			       HB_MAP_VALUE_INVALID,
+			       HB_MAP_VALUE_INVALID>;
 
+  hb_map_t () = default;
+  ~hb_map_t () = default;
+  hb_map_t (hb_map_t& o) = default;
+  hb_map_t& operator= (const hb_map_t& other) = default;
+  hb_map_t& operator= (hb_map_t&& other) = default;
+  hb_map_t (std::initializer_list<hb_pair_t<hb_codepoint_t, hb_codepoint_t>> lst) : hashmap (lst) {}
+  template <typename Iterable,
+	    hb_requires (hb_is_iterable (Iterable))>
+  hb_map_t (const Iterable &o) : hashmap (o) {}
+};
 
 #endif /* HB_MAP_HH */
diff --git a/src/test-map.cc b/src/test-map.cc
index b685530..2d03058 100644
--- a/src/test-map.cc
+++ b/src/test-map.cc
@@ -64,5 +64,15 @@
     v = hb_map_t {};
   }
 
+  /* Test initializing from initializer list and swapping. */
+  {
+    using pair_t = hb_pair_t<hb_codepoint_t, hb_codepoint_t>;
+    hb_map_t v1 {pair_t{1,2}, pair_t{4,5}};
+    hb_map_t v2 {pair_t{3,4}};
+    hb_swap (v1, v2);
+    assert (v1.get_population () == 1);
+    assert (v2.get_population () == 2);
+  }
+
   return 0;
 }
diff --git a/src/test-set.cc b/src/test-set.cc
index 5c28beb..286f1a9 100644
--- a/src/test-set.cc
+++ b/src/test-set.cc
@@ -60,7 +60,7 @@
     assert (v.get_population () == 2);
   }
 
-  /* Test initializing set from iterable. */
+  /* Test initializing from iterable. */
   {
     hb_set_t s;
 
@@ -72,7 +72,7 @@
     assert (v.get_population () == 2);
   }
 
-  /* Test initializing set from iterator. */
+  /* Test initializing from iterator. */
   {
     hb_set_t s;
 
@@ -84,7 +84,7 @@
     assert (v.get_population () == 2);
   }
 
-  /* Test initializing set from initializer list and swapping. */
+  /* Test initializing from initializer list and swapping. */
   {
     hb_set_t v1 {1, 2, 3};
     hb_set_t v2 {4, 5};