diff --git a/src/hb-algs.hh b/src/hb-algs.hh index d377772e0fe5d2b57d32ea60847a36cb1fd521bf..0db2184cfb7aba22b57b394e49ddbf0a088bccd0 100644 --- a/src/hb-algs.hh +++ b/src/hb-algs.hh @@ -41,6 +41,13 @@ struct } HB_FUNCOBJ (hb_identity); +struct +{ + template hb_remove_reference + operator () (T&& v) const { return v; } +} +HB_FUNCOBJ (hb_rvalue); + struct { template bool diff --git a/src/hb-map.hh b/src/hb-map.hh index 6eac8c3d33c62025b6579efb1178e1d8eac192de..2f0659562e42c312777d8f5a5e54764597174b8d 100644 --- a/src/hb-map.hh +++ b/src/hb-map.hh @@ -221,12 +221,14 @@ struct hb_hashmap_t + hb_array (items, mask ? mask + 1 : 0) | hb_filter (&item_t::is_real) | hb_map (&item_t::key) + | hb_map (hb_rvalue) ) auto values () const HB_AUTO_RETURN ( + hb_array (items, mask ? mask + 1 : 0) | hb_filter (&item_t::is_real) | hb_map (&item_t::value) + | hb_map (hb_rvalue) ) protected: