From 59a8fa53533b10b9c25458d9ba2d68b7b01c3ff0 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 24 Apr 2019 12:19:13 -0400 Subject: [PATCH] [iter] Add tests for casting to hb_iter_t<> base class for hb_sorted_array_t<> Something's phishy about hb_sorted_array_t<>. Can't get it work nicely with change I'm making. Ugh.. --- src/test-iter.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/test-iter.cc b/src/test-iter.cc index 9ce8b0ca2..3de340145 100644 --- a/src/test-iter.cc +++ b/src/test-iter.cc @@ -91,7 +91,7 @@ test_iterator (Iter it) } template + hb_enable_if (hb_is_iterable (Iterable))> static void test_iterable (const Iterable &lst = Null(Iterable)) { @@ -127,6 +127,11 @@ main (int argc, char **argv) hb_set_t st; test_iterable (st); hb_sorted_array_t sa; + (void) static_cast, hb_sorted_array_t::item_t>&> (sa); + (void) static_cast, hb_sorted_array_t::__item_t__>&> (sa); + (void) static_cast, int&>&>(sa); + (void) static_cast>&>(sa); + (void) static_cast, int&>&> (sa); test_iterable (sa); test_iterable > ();