提交 27b20930 编写于 作者: B Behdad Esfahbod

[map] Return rvalues from keys()/values()

上级 372c5b97
......@@ -41,6 +41,13 @@ struct
}
HB_FUNCOBJ (hb_identity);
struct
{
template <typename T> hb_remove_reference<T>
operator () (T&& v) const { return v; }
}
HB_FUNCOBJ (hb_rvalue);
struct
{
template <typename T> bool
......
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册