[meta] Back to using _ft suffix for function-object types

Seprate namespace, cleaner, more clear.
This commit is contained in:
Behdad Esfahbod 2019-01-26 22:58:26 +01:00
parent 2aff6d9625
commit 313d63e240
2 changed files with 4 additions and 4 deletions

View File

@ -35,7 +35,7 @@ template <typename T>
inline typename T::iter_t
hb_iter (const T& c) { return c.iter (); }
static HB_UNUSED const struct hb_identity_t
static HB_UNUSED const struct hb_identity_ft
{
template <typename T> T
operator () (const T& v) const { return v; }
@ -59,13 +59,13 @@ struct hb_pair_t
template <typename T1, typename T2> static inline hb_pair_t<T1, T2>
hb_pair (T1 a, T2 b) { return hb_pair_t<T1, T2> (a, b); }
static HB_UNUSED const struct hb_first_t
static HB_UNUSED const struct hb_first_ft
{
template <typename Pair> typename Pair::first_t
operator () (const Pair& pair) const { return pair.first; }
} hb_first;
static HB_UNUSED const struct hb_second_t
static HB_UNUSED const struct hb_second_ft
{
template <typename Pair> typename Pair::second_t
operator () (const Pair& pair) const { return pair.second; }

View File

@ -281,7 +281,7 @@ struct hb_filter_iter_factory_t
Pred p;
Proj f;
};
template <typename Pred, typename Proj = const hb_identity_t&>
template <typename Pred, typename Proj = const hb_identity_ft&>
inline hb_filter_iter_factory_t<Pred, Proj>
hb_filter (Pred&& p, Proj&& f = hb_identity)
{ return hb_filter_iter_factory_t<Pred, Proj> (p, f); }