[map] Return rvalues from keys()/values()
This commit is contained in:
parent
372c5b97bf
commit
27b2093009
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue