[iter] Add hb_len() function-object
This commit is contained in:
parent
a030ce4ff8
commit
f639b9a8ea
|
@ -145,6 +145,14 @@ static const struct
|
|||
|
||||
} hb_iter HB_UNUSED;
|
||||
|
||||
static const struct
|
||||
{
|
||||
template <typename T>
|
||||
unsigned
|
||||
operator () (T&& c) const
|
||||
{ return hb_iter (c).len (); }
|
||||
} hb_len HB_UNUSED;
|
||||
|
||||
|
||||
/* Mixin to fill in what the subclass doesn't provide. */
|
||||
template <typename iter_t, typename item_t = typename iter_t::__item_t__>
|
||||
|
|
|
@ -158,6 +158,8 @@ main (int argc, char **argv)
|
|||
| hb_drain
|
||||
;
|
||||
|
||||
hb_len (src);
|
||||
|
||||
t << 1;
|
||||
long vl;
|
||||
s >> vl;
|
||||
|
|
Loading…
Reference in New Issue