[iter] Allow hb_len() to fetch c.len as non-function
This commit is contained in:
parent
8d29be39b2
commit
e1dc4920ee
|
@ -172,10 +172,16 @@ struct
|
||||||
HB_FUNCOBJ (hb_iter);
|
HB_FUNCOBJ (hb_iter);
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
template <typename T> unsigned
|
template <typename T> auto
|
||||||
operator () (T&& c) const
|
impl (T&& c, hb_priority<1>) const HB_RETURN (unsigned, c.len ())
|
||||||
{ return c.len (); }
|
|
||||||
|
|
||||||
|
template <typename T> auto
|
||||||
|
impl (T&& c, hb_priority<0>) const HB_RETURN (unsigned, c.len)
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
template <typename T> auto
|
||||||
|
operator () (T&& c) const HB_RETURN (unsigned, impl (std::forward<T> (c), hb_prioritize))
|
||||||
}
|
}
|
||||||
HB_FUNCOBJ (hb_len);
|
HB_FUNCOBJ (hb_len);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue