From 076faf7c1803238f135034579935e6b8f10c774c Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 30 Dec 2018 01:40:08 -0500 Subject: [PATCH] [iter] Disable operator + To see if it makes bots happy... This is frustrating. --- src/hb-iter.hh | 5 +++-- src/test-iter.cc | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/hb-iter.hh b/src/hb-iter.hh index f46003af5..24a7e3bcb 100644 --- a/src/hb-iter.hh +++ b/src/hb-iter.hh @@ -75,7 +75,8 @@ struct hb_iter_t iter_t& operator ++ () { thiz()->__next__ (); return *thiz(); } iter_t& operator -= (unsigned count) { thiz()->__rewind__ (count); return *thiz(); } iter_t& operator -- () { thiz()->__prev__ (); return *thiz(); } - iter_t operator + (unsigned count) const { iter_t c (*thiz()); c += count; return c; } + //TODO(C++11)iter_t operator + (unsigned count) const { iter_t c (*thiz()); c += count; return c; } + //TODO(C++11)friend iter_t operator + (unsigned count, const iter_t &it) { return it + count; } iter_t operator ++ (int) { iter_t c (*thiz()); ++*thiz(); return c; } iter_t operator - (unsigned count) const { iter_t c (*thiz()); c -= count; return c; } iter_t operator -- (int) { iter_t c (*thiz()); --*thiz(); return c; } @@ -102,7 +103,7 @@ struct hb_iter_t using Name::operator ++; \ using Name::operator -=; \ using Name::operator --; \ - using Name::operator +; \ + /*TODO(C++11)using Name::operator +;*/ \ using Name::operator -; \ using Name::is_random_access; \ static_assert (true, "") diff --git a/src/test-iter.cc b/src/test-iter.cc index 57f99558a..f93c21227 100644 --- a/src/test-iter.cc +++ b/src/test-iter.cc @@ -74,8 +74,9 @@ test_iterator (Iterator it) for (auto c = it.iter (); c; c++) *c; - it += it.len () + 10; - it = it + 10; + it += it.len (); + //TODO(C++11)it = it + 10; + //TODO(C++11)it = 10 + it; assert (*it == it[0]);