63 template <
typename iter_t,
typename Item =
typename iter_t::__item_t__>
74 const iter_t* thiz ()
const {
return static_cast<const iter_t *
> (
this); }
75 iter_t* thiz () {
return static_cast< iter_t *
> (
this); }
83 iter_t
iter ()
const {
return *thiz(); }
85 iter_t
begin ()
const {
return *thiz(); }
86 iter_t
end ()
const {
return thiz()->__end__ (); }
87 explicit operator bool ()
const {
return thiz()->__more__ (); }
88 unsigned len ()
const {
return thiz()->__len__ (); }
112 template <
typename T>
114 template <
typename T>
116 template <
typename T>
118 template <
typename T>
129 #define HB_ITER_USING(Name) \
130 using item_t = typename Name::item_t; \
133 using Name::get_item_size; \
134 using Name::is_iterator; \
136 using Name::operator bool; \
138 using Name::operator ->; \
139 using Name::operator *; \
140 using Name::operator []; \
141 using Name::operator +=; \
142 using Name::operator ++; \
143 using Name::operator -=; \
144 using Name::operator --; \
145 using Name::operator +; \
146 using Name::operator -; \
147 using Name::operator >>; \
148 using Name::operator <<; \
149 static_assert (true, "")
152 template <
typename Iterable>
154 template <
typename Iterable>
165 {
return hb_deref (std::forward<T> (
c)).iter (); }
181 template <
typename T>
unsigned
189 template <
typename iter_t,
typename item_t =
typename iter_t::__item_t__>
194 const iter_t* thiz ()
const {
return static_cast<const iter_t *
> (
this); }
195 iter_t* thiz () {
return static_cast< iter_t *
> (
this); }
205 { iter_t
c (*thiz());
unsigned l = 0;
while (
c) {
c++;
l++; }
return l; }
219 if (thiz()->is_random_access_iterator)
220 return *thiz() + thiz()->len ();
235 template <
typename iter_t,
typename item_t =
typename iter_t::__item_t__>
254 template<
typename Iter,
typename Item>
257 template <
typename Item2 = Item>
264 #define hb_is_iterator_of(Iter, Item) hb_is_iterator_of<Iter, Item>::value
265 #define hb_is_iterator(Iter) hb_is_iterator_of (Iter, typename Iter::item_t)
269 template <
typename T>
274 template <
typename U>
283 #define hb_is_iterable(Iterable) hb_is_iterable<Iterable>::value
287 template<
typename Iter,
typename Item>
291 template <
typename Iter2 = Iter,
294 template <
typename Iter2 = Iter>
301 #define hb_is_source_of(Iter, Item) hb_is_source_of<Iter, Item>::value
303 template<
typename Iter,
typename Item>
307 template <
typename Iter2 = Iter,
310 template <
typename Iter2 = Iter>
317 #define hb_is_sink_of(Iter, Item) hb_is_sink_of<Iter, Item>::value
320 #define hb_is_sorted_source_of(Iter, Item) \
321 (hb_is_source_of(Iter, Item) && Iter::is_sorted_iterator)
326 template <
typename Iterable,
330 template <typename Iterable,
338 template <
typename Iterable,
342 template <
typename Iterable,
353 template <
typename Lhs,
typename Rhs,
360 enum class hb_function_sortedness_t {
366 template <
typename Iter,
typename Proj, hb_function_sortedness_t Sorted,
368 struct hb_map_iter_t :
369 hb_iter_t<hb_map_iter_t<Iter, Proj, Sorted>,
370 decltype (hb_get (hb_declval (Proj), *hb_declval (Iter)))>
372 hb_map_iter_t (
const Iter&
it, Proj f_) :
it (
it),
f (f_) {}
375 static constexpr
bool is_random_access_iterator = Iter::is_random_access_iterator;
376 static constexpr
bool is_sorted_iterator =
377 Sorted == hb_function_sortedness_t::SORTED ?
true :
378 Sorted == hb_function_sortedness_t::RETAINS_SORTING ? Iter::is_sorted_iterator :
380 __item_t__ __item__ ()
const {
return hb_get (
f.get (), *
it); }
381 __item_t__ __item_at__ (
unsigned i)
const {
return hb_get (
f.get (),
it[
i]); }
382 bool __more__ ()
const {
return bool (
it); }
383 unsigned __len__ ()
const {
return it.len (); }
384 void __next__ () { ++
it; }
385 void __forward__ (
unsigned n) {
it +=
n; }
386 void __prev__ () { --
it; }
387 void __rewind__ (
unsigned n) {
it -=
n; }
388 hb_map_iter_t __end__ ()
const {
return hb_map_iter_t (
it.end (),
f); }
390 {
return it !=
o.it; }
397 template <
typename Proj, hb_function_sortedness_t Sorted>
402 template <
typename Iter,
404 hb_map_iter_t<Iter, Proj, Sorted>
406 {
return hb_map_iter_t<Iter, Proj, Sorted> (
it,
f); }
413 template <
typename Proj>
421 template <
typename Proj>
429 template <
typename Proj>
436 template <
typename Iter,
typename Pred,
typename Proj,
440 typename Iter::item_t>
443 {
while (it && !hb_has (
p.get (), hb_get (
f.get (), *it))) ++it; }
449 void __next__ () {
do ++it;
while (it && !hb_has (
p.get (), hb_get (
f.get (), *it))); }
450 void __prev__ () {
do --it;
while (it && !hb_has (
p.get (), hb_get (
f.get (), *it))); }
453 {
return it !=
o.it; }
460 template <
typename Pred,
typename Proj>
465 template <
typename Iter,
477 template <
typename Pred = decltype ((hb_identity)),
478 typename Proj = decltype ((hb_identity))>
480 operator () (Pred&&
p = hb_identity, Proj&&
f = hb_identity)
const
485 template <
typename Redu,
typename InitT>
490 template <
typename Iter,
496 AccuT
value = init_value;
508 template <
typename Redu,
typename InitT>
518 template <
typename A,
typename B>
521 hb_pair_t<typename A::item_t, typename B::item_t>>
528 A::is_random_access_iterator &&
529 B::is_random_access_iterator;
559 unsigned __len__ ()
const {
return hb_min (
a.len (),
b.len ()); }
568 {
return a !=
o.a &&
b !=
o.b; }
576 template <
typename A,
typename B,
586 template <
typename A,
typename B>
588 hb_iter_t<hb_concat_iter_t<A, B>, typename A::item_t>
597 A::is_random_access_iterator &&
598 B::is_random_access_iterator;
610 unsigned a_len =
a.len ();
618 unsigned __len__ ()
const {
return a.len () +
b.len (); }
632 while (
n-- && *
this) {
638 unsigned a_len =
a.len ();
641 a.__forward__ (a_len);
661 template <
typename A,
typename B,
671 template <
typename Appl>
676 template <
typename Iter,
681 (
void) hb_invoke (
a, *
it);
701 template <
typename T,
typename S>
713 unsigned __len__ ()
const {
return !step ? UINT_MAX : (end_ -
v) / step; }
723 static inline T end_for (
T start,
T end_,
S step)
751 template <
typename T,
typename S>
759 template <
typename S2 = S>
763 {
v = hb_invoke (std::forward<S2> (
s),
v); }
776 unsigned __len__ ()
const {
return UINT_MAX; }
794 template <
typename T>
806 unsigned __len__ ()
const {
return UINT_MAX; }
829 template <
typename Iterable,
830 typename Index = unsigned,
833 ( hb_zip (hb_iota (
start),
it) )
839 template <
typename Iterable,
858 template <
typename Iter,
871 template <
typename Sink>
876 template <
typename Iter,
903 template <
typename Iter,
915 template <
typename Sink1,
typename Sink2>
920 template <
typename Iter,
953 template <
typename Iterable,
954 typename Pred = decltype ((hb_identity)),
955 typename Proj = decltype ((hb_identity)),
958 Pred&&
p = hb_identity,
959 Proj&&
f = hb_identity)
const
961 for (
auto it = hb_iter (
c);
it; ++
it)
962 if (!hb_match (std::forward<Pred> (
p), hb_get (std::forward<Proj> (
f), *
it)))
970 template <
typename Iterable,
971 typename Pred = decltype ((hb_identity)),
972 typename Proj = decltype ((hb_identity)),
975 Pred&&
p = hb_identity,
976 Proj&&
f = hb_identity)
const
978 for (
auto it = hb_iter (
c);
it; ++
it)
979 if (hb_match (std::forward<Pred> (
p), hb_get (std::forward<Proj> (
f), *
it)))
987 template <
typename Iterable,
988 typename Pred = decltype ((hb_identity)),
989 typename Proj = decltype ((hb_identity)),
992 Pred&&
p = hb_identity,
993 Proj&&
f = hb_identity)
const
995 for (
auto it = hb_iter (
c);
it; ++
it)
996 if (hb_match (std::forward<Pred> (
p), hb_get (std::forward<Proj> (
f), *
it)))
1007 template <
typename C,
typename V,
1012 for (
auto i = hb_iter (
c);
i;
i++)
1016 template <
typename S,
typename D>
1020 hb_iter (is) | hb_sink (
id);
small capitals from c petite p scientific f u
small capitals from c petite p scientific i
[1]
QBitArray operator|(const QBitArray &a1, const QBitArray &a2)
void const void *obj HB_UNUSED
struct hb_iter_fallback_mixin_t HB_FUNCOBJ
void hb_copy(S &&is, D &&id)
#define hb_is_iterator(Iter)
decltype(hb_deref(hb_declval(Iterable)).iter()) hb_iter_type
hb_iter_type< T > operator()(T &&c) const
auto it hb_map(hb_second)) template< typename Type > inline hb_array_t< Type > operator()(hb_array_t< Type > array
void hb_fill(C &&c, const V &v)
decltype(*hb_deref(hb_declval(Iterable)).iter()) hb_item_type
static auto hb_requires(hb_is_iterable(Iterable))> static inline auto end(Iterable &&iterable) HB_AUTO_RETURN(hb_iter(iterable).end()) namespace OT
_hb_static_size< T, void > hb_static_size
constexpr bool operator!=(const timespec &t1, const timespec &t2)
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter * iter
EGLOutputLayerEXT EGLint EGLAttrib value
GLenum GLuint GLenum GLsizei length
GLboolean GLboolean GLboolean b
GLsizei const GLfloat * v
[13]
GLboolean GLboolean GLboolean GLboolean a
[7]
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat s1
GLenum GLenum GLsizei count
QtPrivate::QRegularExpressionMatchIteratorRangeBasedForIterator begin(const QRegularExpressionMatchIterator &iterator)
__item_t__ __item_at__(unsigned i) const
static constexpr bool is_sorted_iterator
hb_concat_iter_t __end__() const
__item_t__ __item__() const
hb_concat_iter_t(A &a, B &b)
static constexpr bool is_random_access_iterator
bool operator!=(const hb_concat_iter_t &o) const
hb_concat_iter_t(const A &a, const B &b)
void __forward__(unsigned n)
hb_filter_iter_t< Iter, Pred, Proj > operator()(Iter it)
hb_filter_iter_factory_t(Pred p, Proj f)
bool operator!=(const hb_filter_iter_t &o) const
static constexpr bool is_sorted_iterator
hb_filter_iter_t(const Iter &it_, Pred p_, Proj f_)
hb_filter_iter_t __end__() const
__item_t__ __item__() const
bool operator!=(const hb_iota_iter_t &o) const
__item_t__ __item__() const
static constexpr bool is_random_access_iterator
hb_iota_iter_t(T start, S step)
hb_iota_iter_t __end__() const
static constexpr bool is_sorted_iterator
static hb_true_type impl(hb_priority< 2 >, hb_iter_t< Iter, hb_type_identity< Item2 >> *)
static hb_false_type impl(hb_priority< 0 >, const void *)
hb_iter_fallback_mixin_t()=default
item_t __item_at__(unsigned i) const
hb_iter_fallback_mixin_t(const hb_iter_fallback_mixin_t &o HB_UNUSED)=default
void __forward__(unsigned n)
hb_iter_fallback_mixin_t(hb_iter_fallback_mixin_t &&o HB_UNUSED)=default
void __rewind__(unsigned n)
hb_iter_fallback_mixin_t & operator=(const hb_iter_fallback_mixin_t &o HB_UNUSED)=default
hb_iter_t & operator=(const hb_iter_t &o HB_UNUSED)=default
static constexpr bool is_iterator
hb_remove_reference< item_t > * operator->() const
static constexpr bool is_random_access_iterator
static constexpr bool is_sorted_iterator
iter_t & operator+=(unsigned count) &
hb_iter_t(hb_iter_t &&o HB_UNUSED)=default
iter_t & operator>>(T &v) &
hb_iter_t(const hb_iter_t &o HB_UNUSED)=default
iter_t operator-(unsigned count) const
iter_t & operator<<(const T v) &
constexpr unsigned get_item_size() const
iter_t & operator-=(unsigned count) &
item_t operator[](unsigned i) const
hb_iter_with_fallback_t(hb_iter_with_fallback_t &&o HB_UNUSED)=default
hb_iter_with_fallback_t(const hb_iter_with_fallback_t &o HB_UNUSED)=default
hb_iter_with_fallback_t()=default
hb_iter_with_fallback_t & operator=(const hb_iter_with_fallback_t &o HB_UNUSED)=default
hb_map_iter_factory_t(Proj f)
hb_map_iter_t< Iter, Proj, Sorted > operator()(Iter it)
hb_range_iter_t(T start, T end_, S step)
static constexpr bool is_random_access_iterator
hb_range_iter_t __end__() const
void __rewind__(unsigned n)
bool operator!=(const hb_range_iter_t &o) const
void __forward__(unsigned n)
__item_t__ __item_at__(unsigned j) const
static constexpr bool is_sorted_iterator
__item_t__ __item__() const
AccuT operator()(Iter it)
hb_reduce_t(Redu r, InitT init_value)
hb_repeat_iter_t __end__() const
static constexpr bool is_random_access_iterator
__item_t__ __item_at__(unsigned j) const
void __forward__(unsigned)
hb_repeat_iter_t(T value)
void __rewind__(unsigned)
static constexpr bool is_sorted_iterator
__item_t__ __item__() const
bool operator!=(const hb_repeat_iter_t &o) const
hb_unzip_t(Sink1 s1, Sink2 s2)
static constexpr bool is_random_access_iterator
hb_zip_iter_t __end__() const
void __rewind__(unsigned n)
bool operator!=(const hb_zip_iter_t &o) const
hb_pair_t< typename A::item_t, typename B::item_t > __item_t__
static constexpr bool is_sorted_iterator
hb_zip_iter_t(const A &a, const B &b)
__item_t__ __item_at__(unsigned i) const
__item_t__ __item__() const
void __forward__(unsigned n)