diff --git a/src/hb-map.hh b/src/hb-map.hh index 71d45c106..df72821c1 100644 --- a/src/hb-map.hh +++ b/src/hb-map.hh @@ -479,4 +479,15 @@ void hb_hashmap_destroy (hb_hashmap_t* map) hb_free (map); } +namespace hb { + +template +struct vtable> +{ + static constexpr auto destroy = hb_hashmap_destroy; +}; + +} + + #endif /* HB_MAP_HH */ diff --git a/src/test-map.cc b/src/test-map.cc index fb52d14fe..8cabf53bd 100644 --- a/src/test-map.cc +++ b/src/test-map.cc @@ -212,6 +212,12 @@ main (int argc, char **argv) m.keys_ref (); m.values_ref (); } + /* Test more complex unique_ptr's. */ + { + hb_hashmap_t>> m; + + m.get (0); + } return 0; }