From ae8da4b61b4cc3b55242b85fe7c63393d65bd6cf Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 22 Apr 2019 15:25:11 -0400 Subject: [PATCH] Minor --- src/hb-iter.hh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/hb-iter.hh b/src/hb-iter.hh index a4ffbd6f0..46d6c406b 100644 --- a/src/hb-iter.hh +++ b/src/hb-iter.hh @@ -209,13 +209,16 @@ template struct hb_is_iterable { private: + template - static auto test (int) -> decltype (hb_declval (U).iter (), hb_true_t ()); + static auto impl (hb_priority<1>) -> decltype (hb_declval (U).iter (), hb_true_t ()); + template - static hb_false_t test (...); + static hb_false_t impl (hb_priority<0>); public: - enum { value = decltype (test (0))::value }; + + enum { value = decltype (impl (hb_prioritize))::value }; }; #define hb_is_iterable(Iterable) hb_is_iterable::value