From 98974ac16f5caf282c9c7cf0c417b494efd6af1d Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 10 May 2019 11:18:52 -0700 Subject: [PATCH] [iter] Adjust is_source_of / is_sink_of There are two cases that we accept. Encode both. --- src/hb-iter.hh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/hb-iter.hh b/src/hb-iter.hh index 131ffb9e7..cdc4fdceb 100644 --- a/src/hb-iter.hh +++ b/src/hb-iter.hh @@ -279,6 +279,8 @@ struct hb_is_source_of template static hb_true_t impl (hb_priority<2>); + template + static auto impl (hb_priority<1>) -> decltype (hb_declval (Iter2) >> hb_declval (Item &), hb_true_t ()); static hb_false_t impl (hb_priority<0>); public: @@ -290,7 +292,11 @@ template struct hb_is_sink_of { private: - static auto impl (hb_priority<2>) -> decltype (hb_declval (Iter) << hb_declval (Item), hb_true_t ()); + template + static hb_true_t impl (hb_priority<2>); + template + static auto impl (hb_priority<1>) -> decltype (hb_declval (Iter2) << hb_declval (Item), hb_true_t ()); static hb_false_t impl (hb_priority<0>); public: