[algs] Try f[v] in hb_get() as last resort

This commit is contained in:
Behdad Esfahbod 2019-05-08 09:14:44 -07:00
parent 0601a19d38
commit 26adefd9ea
1 changed files with 9 additions and 3 deletions

View File

@ -100,14 +100,20 @@ struct
private:
template <typename Proj, typename Val> auto
impl (Proj&& f, Val &&v, hb_priority<1>) const HB_AUTO_RETURN
impl (Proj&& f, Val &&v, hb_priority<2>) const HB_AUTO_RETURN
(hb_deref (hb_forward<Proj> (f)).get (hb_forward<Val> (v)))
template <typename Proj, typename Val> auto
impl (Proj&& f, Val &&v, hb_priority<1>) const HB_AUTO_RETURN
(
hb_invoke (hb_forward<Proj> (f),
hb_forward<Val> (v))
)
template <typename Proj, typename Val> auto
impl (Proj&& f, Val &&v, hb_priority<0>) const HB_AUTO_RETURN
(
hb_invoke (hb_forward<Proj> (f),
hb_forward<Val> (v))
hb_forward<Proj> (f)[hb_forward<Val> (v)]
)
public: