Whitespace

This commit is contained in:
Behdad Esfahbod 2019-05-07 16:53:03 -07:00
parent 95426ea983
commit 7654ebe3a5
3 changed files with 52 additions and 28 deletions

View File

@ -38,13 +38,15 @@ struct
{ {
template <typename T> T template <typename T> T
operator () (const T& v) const { return v; } operator () (const T& v) const { return v; }
} HB_FUNCOBJ (hb_identity); }
HB_FUNCOBJ (hb_identity);
struct struct
{ {
template <typename T> bool template <typename T> bool
operator () (const T& v) const { return bool (v); } operator () (const T& v) const { return bool (v); }
} HB_FUNCOBJ (hb_bool); }
HB_FUNCOBJ (hb_bool);
struct struct
{ {
@ -64,7 +66,8 @@ struct
template <typename T> auto template <typename T> auto
operator () (const T& v) const HB_RETURN (uint32_t, impl (v, hb_prioritize)) operator () (const T& v) const HB_RETURN (uint32_t, impl (v, hb_prioritize))
} HB_FUNCOBJ (hb_hash); }
HB_FUNCOBJ (hb_hash);
struct struct
{ {
@ -94,7 +97,8 @@ struct
hb_prioritize, hb_prioritize,
hb_forward<Vals> (vs)...) hb_forward<Vals> (vs)...)
) )
} HB_FUNCOBJ (hb_invoke); }
HB_FUNCOBJ (hb_invoke);
struct struct
{ {
@ -119,7 +123,8 @@ struct
hb_forward<Val> (v), hb_forward<Val> (v),
hb_prioritize) hb_prioritize)
) )
} HB_FUNCOBJ (hb_has); }
HB_FUNCOBJ (hb_has);
struct struct
{ {
@ -145,7 +150,8 @@ struct
hb_forward<Val> (v), hb_forward<Val> (v),
hb_prioritize) hb_prioritize)
) )
} HB_FUNCOBJ (hb_get); }
HB_FUNCOBJ (hb_get);
template <typename T1, typename T2> template <typename T1, typename T2>
@ -170,24 +176,28 @@ struct
{ {
template <typename Pair> auto template <typename Pair> auto
operator () (const Pair& pair) const HB_AUTO_RETURN (pair.first) operator () (const Pair& pair) const HB_AUTO_RETURN (pair.first)
} HB_FUNCOBJ (hb_first); }
HB_FUNCOBJ (hb_first);
struct struct
{ {
template <typename Pair> auto template <typename Pair> auto
operator () (const Pair& pair) const HB_AUTO_RETURN (pair.second) operator () (const Pair& pair) const HB_AUTO_RETURN (pair.second)
} HB_FUNCOBJ (hb_second); }
HB_FUNCOBJ (hb_second);
struct struct
{ {
template <typename T, typename T2> auto template <typename T, typename T2> auto
operator () (const T& a, const T2& b) const HB_AUTO_RETURN (a <= b ? a : b) operator () (const T& a, const T2& b) const HB_AUTO_RETURN (a <= b ? a : b)
} HB_FUNCOBJ (hb_min); }
HB_FUNCOBJ (hb_min);
struct struct
{ {
template <typename T, typename T2> auto template <typename T, typename T2> auto
operator () (const T& a, const T2& b) const HB_AUTO_RETURN (a >= b ? a : b) operator () (const T& a, const T2& b) const HB_AUTO_RETURN (a >= b ? a : b)
} HB_FUNCOBJ (hb_max); }
HB_FUNCOBJ (hb_max);
/* /*

View File

@ -164,7 +164,8 @@ struct
operator () (Type (&array)[length]) const operator () (Type (&array)[length]) const
{ return hb_array_t<Type> (array, length); } { return hb_array_t<Type> (array, length); }
} HB_FUNCOBJ (hb_iter); }
HB_FUNCOBJ (hb_iter);
/* Mixin to fill in what the subclass doesn't provide. */ /* Mixin to fill in what the subclass doesn't provide. */
template <typename iter_t, typename item_t = typename iter_t::__item_t__> template <typename iter_t, typename item_t = typename iter_t::__item_t__>
@ -360,7 +361,8 @@ struct
hb_map_iter_factory_t<Proj> hb_map_iter_factory_t<Proj>
operator () (Proj&& f) const operator () (Proj&& f) const
{ return hb_map_iter_factory_t<Proj> (f); } { return hb_map_iter_factory_t<Proj> (f); }
} HB_FUNCOBJ (hb_map); }
HB_FUNCOBJ (hb_map);
template <typename Iter, typename Pred, typename Proj, template <typename Iter, typename Pred, typename Proj,
hb_enable_if (hb_is_iterator (Iter))> hb_enable_if (hb_is_iterator (Iter))>
@ -408,7 +410,8 @@ struct
hb_filter_iter_factory_t<Pred, Proj> hb_filter_iter_factory_t<Pred, Proj>
operator () (Pred&& p = hb_bool, Proj&& f = hb_identity) const operator () (Pred&& p = hb_bool, Proj&& f = hb_identity) const
{ return hb_filter_iter_factory_t<Pred, Proj> (p, f); } { return hb_filter_iter_factory_t<Pred, Proj> (p, f); }
} HB_FUNCOBJ (hb_filter); }
HB_FUNCOBJ (hb_filter);
template <typename Redu, typename InitT> template <typename Redu, typename InitT>
struct hb_reduce_t struct hb_reduce_t
@ -437,7 +440,8 @@ struct
hb_reduce_t<Redu, InitT> hb_reduce_t<Redu, InitT>
operator () (Redu&& r, InitT init_value) const operator () (Redu&& r, InitT init_value) const
{ return hb_reduce_t<Redu, InitT> (r, init_value); } { return hb_reduce_t<Redu, InitT> (r, init_value); }
} HB_FUNCOBJ (hb_reduce); }
HB_FUNCOBJ (hb_reduce);
/* hb_zip() */ /* hb_zip() */
@ -480,7 +484,8 @@ struct
hb_zip_iter_t<hb_iter_t (A), hb_iter_t (B)> hb_zip_iter_t<hb_iter_t (A), hb_iter_t (B)>
operator () (A& a, B &b) const operator () (A& a, B &b) const
{ return hb_zip_iter_t<hb_iter_t (A), hb_iter_t (B)> (hb_iter (a), hb_iter (b)); } { return hb_zip_iter_t<hb_iter_t (A), hb_iter_t (B)> (hb_iter (a), hb_iter (b)); }
} HB_FUNCOBJ (hb_zip); }
HB_FUNCOBJ (hb_zip);
/* hb_enumerate */ /* hb_enumerate */
@ -526,7 +531,8 @@ struct
hb_enumerate_iter_t<hb_iter_t (Iterable)> hb_enumerate_iter_t<hb_iter_t (Iterable)>
operator () (Iterable& it) const operator () (Iterable& it) const
{ return hb_enumerate_iter_t<hb_iter_t (Iterable)> (hb_iter (it)); } { return hb_enumerate_iter_t<hb_iter_t (Iterable)> (hb_iter (it)); }
} HB_FUNCOBJ (hb_enumerate); }
HB_FUNCOBJ (hb_enumerate);
/* hb_apply() */ /* hb_apply() */
@ -556,7 +562,8 @@ struct
template <typename Appl> hb_apply_t<Appl&> template <typename Appl> hb_apply_t<Appl&>
operator () (Appl *a) const operator () (Appl *a) const
{ return hb_apply_t<Appl&> (*a); } { return hb_apply_t<Appl&> (*a); }
} HB_FUNCOBJ (hb_apply); }
HB_FUNCOBJ (hb_apply);
/* hb_sink() */ /* hb_sink() */
@ -586,7 +593,8 @@ struct
template <typename Sink> hb_sink_t<Sink&> template <typename Sink> hb_sink_t<Sink&>
operator () (Sink *s) const operator () (Sink *s) const
{ return hb_sink_t<Sink&> (*s); } { return hb_sink_t<Sink&> (*s); }
} HB_FUNCOBJ (hb_sink); }
HB_FUNCOBJ (hb_sink);
/* hb-drain: hb_sink to void / blackhole / /dev/null. */ /* hb-drain: hb_sink to void / blackhole / /dev/null. */
@ -600,7 +608,8 @@ struct
for (; it; ++it) for (; it; ++it)
(void) *it; (void) *it;
} }
} HB_FUNCOBJ (hb_drain); }
HB_FUNCOBJ (hb_drain);
/* hb_unzip(): unzip and sink to two sinks. */ /* hb_unzip(): unzip and sink to two sinks. */
@ -635,7 +644,8 @@ struct
template <typename Sink1, typename Sink2> hb_unzip_t<Sink1&, Sink2&> template <typename Sink1, typename Sink2> hb_unzip_t<Sink1&, Sink2&>
operator () (Sink1 *s1, Sink2 *s2) const operator () (Sink1 *s1, Sink2 *s2) const
{ return hb_unzip_t<Sink1&, Sink2&> (*s1, *s2); } { return hb_unzip_t<Sink1&, Sink2&> (*s1, *s2); }
} HB_FUNCOBJ (hb_unzip); }
HB_FUNCOBJ (hb_unzip);
/* hb-all, hb-any, hb-none. */ /* hb-all, hb-any, hb-none. */
@ -652,7 +662,8 @@ struct
return false; return false;
return true; return true;
} }
} HB_FUNCOBJ (hb_all); }
HB_FUNCOBJ (hb_all);
struct struct
{ {
template <typename Iterable, template <typename Iterable,
@ -665,7 +676,8 @@ struct
return true; return true;
return false; return false;
} }
} HB_FUNCOBJ (hb_any); }
HB_FUNCOBJ (hb_any);
struct struct
{ {
template <typename Iterable, template <typename Iterable,
@ -678,7 +690,8 @@ struct
return false; return false;
return true; return true;
} }
} HB_FUNCOBJ (hb_none); }
HB_FUNCOBJ (hb_none);
/* /*
* Algorithms operating on iterators. * Algorithms operating on iterators.

View File

@ -81,7 +81,8 @@ struct
reinterpret_cast<const volatile char&> (arg))); reinterpret_cast<const volatile char&> (arg)));
#pragma GCC diagnostic pop #pragma GCC diagnostic pop
} }
} HB_FUNCOBJ (hb_addressof); }
HB_FUNCOBJ (hb_addressof);
template <typename T> static inline T hb_declval (); template <typename T> static inline T hb_declval ();
#define hb_declval(T) (hb_declval<T> ()) #define hb_declval(T) (hb_declval<T> ())
@ -125,8 +126,8 @@ struct
template <typename T> auto template <typename T> auto
operator () (T *v) const HB_AUTO_RETURN (*v) operator () (T *v) const HB_AUTO_RETURN (*v)
}
} HB_FUNCOBJ (hb_deref); HB_FUNCOBJ (hb_deref);
struct struct
{ {
@ -135,8 +136,8 @@ struct
template <typename T> auto template <typename T> auto
operator () (T& v) const HB_AUTO_RETURN (hb_addressof (v)) operator () (T& v) const HB_AUTO_RETURN (hb_addressof (v))
}
} HB_FUNCOBJ (hb_ref); HB_FUNCOBJ (hb_ref);
template <typename T> template <typename T>
struct hb_reference_wrapper struct hb_reference_wrapper