diff --git a/src/hb-cplusplus.hh b/src/hb-cplusplus.hh index 39b150fea..9bda38c47 100644 --- a/src/hb-cplusplus.hh +++ b/src/hb-cplusplus.hh @@ -49,9 +49,10 @@ struct vtable; template struct shared_ptr { + using element_type = T; + using v = vtable; - shared_ptr (std::nullptr_t) : p (nullptr) {} explicit shared_ptr (T *p = nullptr) : p (p) {} shared_ptr (const shared_ptr &o) : p (v::reference (o.p)) {} shared_ptr (shared_ptr &&o) : p (o.p) { o.p = nullptr; } @@ -84,6 +85,11 @@ struct shared_ptr T *p; }; +template struct is_shared_ptr : std::false_type {}; +template struct is_shared_ptr> : std::true_type {}; + +// TODO Implement hash<> and atomic<> + template ()); +#if 0 { hb_hashmap_t, hb::shared_ptr, std::nullptr_t, std::nullptr_t, nullptr, nullptr> m; - hb_hash (hb::shared_ptr ()); m.get (hb::shared_ptr ()); m.get (hb::shared_ptr (hb_set_get_empty ())); } +#endif return 0; }