From 5b33427f2c4d596a12f05ffebebfd68655fd63eb Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 16 Apr 2019 18:28:17 -0400 Subject: [PATCH] Rename HB_AUTO_RETURN_EXPR to HB_AUTO_RETURN --- src/hb-algs.hh | 34 +++++++++++++++++----------------- src/hb-meta.hh | 8 ++++---- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/hb-algs.hh b/src/hb-algs.hh index b1c928246..232467e49 100644 --- a/src/hb-algs.hh +++ b/src/hb-algs.hh @@ -50,11 +50,11 @@ struct { private: template auto - impl (const T& v, hb_priority<1>) const HB_AUTO_RETURN_EXPR (hb_deref_pointer (v).hash ()) + impl (const T& v, hb_priority<1>) const HB_AUTO_RETURN (hb_deref_pointer (v).hash ()) template auto - impl (const T& v, hb_priority<0>) const HB_AUTO_RETURN_EXPR + impl (const T& v, hb_priority<0>) const HB_AUTO_RETURN ( /* Knuth's multiplicative method: */ (uint32_t) v * 2654435761u @@ -63,7 +63,7 @@ struct public: template auto - operator () (const T& v) const HB_AUTO_RETURN_EXPR ((uint32_t) impl (v, hb_prioritize)) + operator () (const T& v) const HB_AUTO_RETURN ((uint32_t) impl (v, hb_prioritize)) } HB_FUNCOBJ (hb_hash); struct @@ -72,23 +72,23 @@ struct /* Pointer-to-member-function. */ template auto - impl (Appl&& a, Val &&v, hb_priority<2>) const HB_AUTO_RETURN_EXPR + impl (Appl&& a, Val &&v, hb_priority<2>) const HB_AUTO_RETURN (hb_forward (hb_deref_pointer (v)).*a ()) /* Pointer-to-member. */ template auto - impl (Appl&& a, Val &&v, hb_priority<1>) const HB_AUTO_RETURN_EXPR + impl (Appl&& a, Val &&v, hb_priority<1>) const HB_AUTO_RETURN (hb_forward (hb_deref_pointer (v)).*a) /* Operator(). */ template auto - impl (Appl&& a, Val &&v, hb_priority<0>) const HB_AUTO_RETURN_EXPR + impl (Appl&& a, Val &&v, hb_priority<0>) const HB_AUTO_RETURN (hb_deref_pointer (a) (hb_forward (v))) public: template auto - operator () (Appl&& a, Val &&v) const HB_AUTO_RETURN_EXPR + operator () (Appl&& a, Val &&v) const HB_AUTO_RETURN ( impl (hb_forward (a), hb_forward (v), @@ -101,11 +101,11 @@ struct private: template auto - impl (Pred&& p, Val &&v, hb_priority<1>) const HB_AUTO_RETURN_EXPR + impl (Pred&& p, Val &&v, hb_priority<1>) const HB_AUTO_RETURN (hb_deref_pointer (p).has (v)) template auto - impl (Pred&& p, Val &&v, hb_priority<0>) const HB_AUTO_RETURN_EXPR + impl (Pred&& p, Val &&v, hb_priority<0>) const HB_AUTO_RETURN ( hb_invoke (hb_forward (p), hb_forward (v)) @@ -114,7 +114,7 @@ struct public: template auto - operator () (Pred&& p, Val &&v) const HB_AUTO_RETURN_EXPR + operator () (Pred&& p, Val &&v) const HB_AUTO_RETURN ( (bool) impl (hb_forward (p), hb_forward (v), @@ -127,11 +127,11 @@ struct private: template auto - impl (Proj&& f, Val &&v, hb_priority<1>) const HB_AUTO_RETURN_EXPR + impl (Proj&& f, Val &&v, hb_priority<1>) const HB_AUTO_RETURN (hb_deref_pointer (f).get (hb_forward (v))) template auto - impl (Proj&& f, Val &&v, hb_priority<0>) const HB_AUTO_RETURN_EXPR + impl (Proj&& f, Val &&v, hb_priority<0>) const HB_AUTO_RETURN ( hb_invoke (hb_forward (f), hb_forward (v)) @@ -140,7 +140,7 @@ struct public: template auto - operator () (Proj&& f, Val &&v) const HB_AUTO_RETURN_EXPR + operator () (Proj&& f, Val &&v) const HB_AUTO_RETURN ( impl (hb_forward (f), hb_forward (v), @@ -170,24 +170,24 @@ hb_pair (T1&& a, T2&& b) { return hb_pair_t (a, b); } struct { template auto - operator () (const Pair& pair) const HB_AUTO_RETURN_EXPR (pair.first) + operator () (const Pair& pair) const HB_AUTO_RETURN (pair.first) } HB_FUNCOBJ (hb_first); struct { template auto - operator () (const Pair& pair) const HB_AUTO_RETURN_EXPR (pair.second) + operator () (const Pair& pair) const HB_AUTO_RETURN (pair.second) } HB_FUNCOBJ (hb_second); struct { template auto - operator () (const T& a, const T2& b) const HB_AUTO_RETURN_EXPR (a <= b ? a : b) + operator () (const T& a, const T2& b) const HB_AUTO_RETURN (a <= b ? a : b) } HB_FUNCOBJ (hb_min); struct { template auto - operator () (const T& a, const T2& b) const HB_AUTO_RETURN_EXPR (a >= b ? a : b) + operator () (const T& a, const T2& b) const HB_AUTO_RETURN (a >= b ? a : b) } HB_FUNCOBJ (hb_max); diff --git a/src/hb-meta.hh b/src/hb-meta.hh index 5698250fc..4a141ce92 100644 --- a/src/hb-meta.hh +++ b/src/hb-meta.hh @@ -36,8 +36,8 @@ /* Function overloading SFINAE and priority. */ -#define HB_AUTO_RETURN_EXPR(E) -> decltype ((E)) { return (E); } -#define HB_VOID_RETURN_EXPR(E) -> hb_void_tt { (E); } +#define HB_AUTO_RETURN(E) -> decltype ((E)) { return (E); } +#define HB_VOID_RETURN(E) -> hb_void_tt { (E); } template struct hb_priority : hb_priority {}; template <> struct hb_priority<0> {}; @@ -90,10 +90,10 @@ static T&& hb_forward (hb_remove_reference&& t) { return (T&&) t; } struct { template auto - operator () (T&& v) const HB_AUTO_RETURN_EXPR (hb_forward (v)) + operator () (T&& v) const HB_AUTO_RETURN (hb_forward (v)) template auto - operator () (T *v) const HB_AUTO_RETURN_EXPR (*v) + operator () (T *v) const HB_AUTO_RETURN (*v) } HB_FUNCOBJ (hb_deref_pointer);