src/hb-iter.hh


Log

Author Commit Date CI Message
Behdad Esfahbod ebf47a95 2019-05-15T15:14:26 [iter] Simplify operator!= of iterator filters Both to save ops, and also because lambdas don't implement operator!=, so this was failing in range-based for loop if a lambda was passed to hb_map() or hb_filter(). Just check end-condition assuming that we are comparing to .end() or iterators that are otherwise derived from current iterator. Ie. don't compare things that are expected to be in common.
Behdad Esfahbod f244224d 2019-05-15T14:19:20 [iter] Use default operators instead of redefining empty ones
Behdad Esfahbod 889dc1eb 2019-05-14T22:28:07 [iter] Remove sort categorization See comments.
Behdad Esfahbod 4d3cf2ad 2019-05-13T17:25:07 [iter] Fix zip iterator sortedness classification logic
Behdad Esfahbod 51376284 2019-05-13T15:36:14 [iter] Track strictly-sorted iterators This make output of hb_enumerate() sorted regardless of input iterator.
Behdad Esfahbod 7e02063f 2019-05-13T15:26:00 [iter] Minor
Behdad Esfahbod e98f0ddd 2019-05-13T13:53:06 Fix extra semi-colon
Behdad Esfahbod 606841b0 2019-05-11T11:54:30 [iter] Check for more before forwarding/rewinding past ends
David Corbett c1c122e7 2019-05-11T11:38:06 [iter] Fix filter rewinding
Behdad Esfahbod 79126df3 2019-05-11T11:23:31 [iter] Add hb_map_sorted() and hb_map_retains_sorting()
Behdad Esfahbod 19e08a14 2019-05-10T21:25:07 [iter] Adjust source_of/sink_of
Behdad Esfahbod 61d150c9 2019-05-10T20:06:31 [meta] Add integral_constant, true_t -> true_type, false_t -> false_type
Behdad Esfahbod 98974ac1 2019-05-10T11:18:52 [iter] Adjust is_source_of / is_sink_of There are two cases that we accept. Encode both.
Behdad Esfahbod ed972d5d 2019-05-09T16:58:28 [iter] Rewrite test functions Notably, add hb_is_source_of(,) and hb_is_sink_of(,) to replace most uses of hb_is_iterator_of(,).
Behdad Esfahbod 726002a6 2019-05-09T14:53:02 [iter] Make hb_is_iterator_of() check is_convertible Instead of is_cr_convertible.
Behdad Esfahbod 4f2ad75a 2019-05-09T12:07:45 [enumerate] Fix hb_enumerate() len for step=0
Behdad Esfahbod 5da3c9c3 2019-05-09T11:30:31 [iter] Fix hb_zip() end condition We should compare-equal to end if either iterator's end reaches, not if both reach at the same time. Fixes infinite-loop in test which was happening after hb_enumerate() switched to using hb_zip().
Behdad Esfahbod 57a5256f 2019-05-09T11:30:27 [iter] Minor
Behdad Esfahbod 12dd56f8 2019-05-09T11:25:02 [iter] Minor
Behdad Esfahbod 46837910 2019-05-09T11:20:41 [iter] Allow negative step in hb_iota()
Behdad Esfahbod 087327af 2019-05-09T11:14:06 [iter] Minor
Behdad Esfahbod 64f0899a 2019-05-09T11:10:31 [iter] Bug fix
Behdad Esfahbod 5d263556 2019-05-09T11:08:25 [iter] Fix
Behdad Esfahbod 2c24ea37 2019-05-09T11:07:38 [iter] Take start value in hb_enumerate() Also rewrite it via composition.
Behdad Esfahbod 7675d0d3 2019-05-09T11:02:56 [iter] Add hb_range() hb_range() is like Python range. hb_iota() has slightly different API. Ie. it takes a start, instead of end.
Behdad Esfahbod 71537f93 2019-05-09T10:46:49 [iota] end -> end_ to not shadow
Behdad Esfahbod 5875d775 2019-05-08T12:25:34 [iter] Rename hb_iter_t() to hb_iter_type<> and add hb_item_type<>
Behdad Esfahbod cdb61eb0 2019-05-08T11:00:18 [iter] Accept pointer in hb_iter() and hb_iter_t()
Behdad Esfahbod c93eeba9 2019-05-08T10:56:09 [iter] Accept pointer in hb_map()
Behdad Esfahbod 50dc3e7d 2019-05-08T10:35:02 Add hb_iota()
Behdad Esfahbod aa4ac13f 2019-05-08T10:02:30 [iter] Actually fix previous commit The iter objects shouldn't not be const. D'oh.
Behdad Esfahbod a66598e0 2019-05-08T09:56:29 [iter] For ref-qualified variants
Behdad Esfahbod 8479eb59 2019-05-08T09:48:55 [iter] Fix hb_sink() to accept rvalue
Behdad Esfahbod 710d459a 2019-05-08T09:33:09 [iter] Default predicates to hb_identity instead of hb_bool The bool conversion happens after predicate is called automatically.
Behdad Esfahbod fe14a400 2019-05-08T09:32:19 Adjust hb_all/any/none
Behdad Esfahbod bdbfdc92 2019-05-07T22:52:43 [iter] Add value and projection to hb_all/any/none Allows for eg, checking all values equal 2: hb_all (it, 2).
Behdad Esfahbod cf61acb9 2019-05-07T22:45:01 [iter] Accept rvalues to hb_enumerate()
Behdad Esfahbod af571dbf 2019-05-07T21:39:20 [meta] Replace most hb_enable_if with hb_requires They do absolutely same thing. hb_requires is to encode constraints, whereas hb_enable_if is for more conditional enabling.
Behdad Esfahbod 41248cce 2019-05-07T20:54:31 Remove MIN/MAX in favor of hb_min/hb_max
Behdad Esfahbod 7654ebe3 2019-05-07T16:53:03 Whitespace
Behdad Esfahbod c09d6c58 2019-05-07T14:09:00 [iter] Require lvalue in operators that return reference
Behdad Esfahbod 8903040f 2019-05-07T00:13:11 Actually make it work
Behdad Esfahbod 025eaa3c 2019-05-07T00:05:37 [iter] Make filter/map copyable
Behdad Esfahbod 0b1ca5a1 2019-05-06T23:04:32 [iter] Adjust hb_filter
Behdad Esfahbod 4c2fd05c 2019-05-06T19:57:15 [iter] Implement range-based for loops Part of https://github.com/harfbuzz/harfbuzz/issues/1648
Ebrahim Byagowi 92588782 2019-04-30T13:05:10 Remove space between right angle brackets now that we have C++11 (#1689)
Behdad Esfahbod 73c82f23 2019-04-26T13:16:48 [iter] Fix hb_is_iterator_of() to actually check item type
Behdad Esfahbod 714307cc 2019-04-24T10:56:12 [iter] Remove fixed TODO
Behdad Esfahbod ae8da4b6 2019-04-22T15:25:11 Minor
Behdad Esfahbod 6916b778 2019-04-16T18:33:51 One more auto return type
Behdad Esfahbod 54ece299 2019-04-16T16:45:53 Use type aliasing for meta-functions, ie. those returning a type
Behdad Esfahbod b8e763fd 2019-04-16T10:50:22 [meta] Add hb_invoke()
Behdad Esfahbod a3fcb9a3 2019-04-16T10:45:20 [meta] Add HB_AUTO_RETURN_EXPR, HB_VOID_RETURN_EXPR, hb_priority, hb_has(), hb_get() The first three based on range-v3.
Behdad Esfahbod 89fea216 2019-04-15T17:36:09 Fix copyright
Behdad Esfahbod 02d864aa 2019-04-15T15:39:03 Add HB_FUNCOBJ() Fixes https://github.com/harfbuzz/harfbuzz/issues/1651
Behdad Esfahbod a98e4068 2019-04-12T22:42:44 Revert "Hide symbols in hb-iter" This reverts commit 98f14c4cdb837a962083a6702f401d41b4c1ec5c. Same as previous commit.
Behdad Esfahbod 98f14c4c 2019-04-12T18:11:18 Hide symbols in hb-iter Painful. All template methods need to be explicitly hidden :(. Maybe we should switch to -fvisibility=hidden pragma. A LOT more to go.
Behdad Esfahbod 2bd27502 2019-04-03T15:31:53 [iter] Tweak SFINAE again Don't think we need hb_is_same().
Behdad Esfahbod d419a9a4 2019-04-03T14:18:19 [iter] Use different SFINAE scheme to make MSVC happy From Orvid King: TLDR; MSVC has some issues using sizeof(declval<T>()) for SFINAE of templated types, so I just used SFINAE in a different context where MSVC doesn't have the issue.
Behdad Esfahbod 42ab32cb 2019-04-02T18:41:33 [iter] Remove passing pointer to hb_iter() While doable with hb_deref_pointer() as well, we also would then need to do it in a ton of places. Not worth it / messy.
Behdad Esfahbod b6f29bf1 2019-04-02T18:12:01 [iter] Accept pointers in hb_iter() No idea how to avoid dupicating code. Was hoping hb_deref_pointer() would do it, but looks like a pointer can't bind to a universal reference T&&. Humm.
Ebrahim Byagowi b8642087 2019-04-02T00:30:06 [iter] hb_reduce, accumulator with a different type
Ebrahim Byagowi e526414c 2019-03-31T12:41:58 [iter] Implement hb_reduce
Behdad Esfahbod 78fc43f2 2019-03-31T19:17:07 [iter] Fix up build, ouch Yeah, some things not very clear...
Behdad Esfahbod 8a8d45b9 2019-03-31T19:00:09 [iter] Adjust hb_copy() and use it Untested.
Behdad Esfahbod e5306927 2019-03-29T23:31:07 [iter] Fix bug in hb_any() and hb_none()
Behdad Esfahbod d5145250 2019-03-29T22:48:12 [iter] Remove more wrong &&'s Sigh...
Behdad Esfahbod 6237b47f 2019-03-29T21:36:49 [iter] Add hb_unzip()
Behdad Esfahbod 8e34cb25 2019-03-29T21:14:20 [iter] Remove unneeded && Next commit needs this. I never fully get this, sigh.
Behdad Esfahbod 4c38a9f6 2019-03-29T20:23:07 Remove hb_assign() Not needed anymore. We just use operator= now.
Behdad Esfahbod 3f36c89f 2019-03-29T15:22:46 Inline explicit_operator macro Now that we require C++11, no need to macro.
Behdad Esfahbod 443db2a2 2019-03-29T10:46:44 [iter] Remove hb_len() Not planning on using it. So remove. Can add later if needed.
Behdad Esfahbod f639b9a8 2019-03-28T21:34:47 [iter] Add hb_len() function-object
Behdad Esfahbod 77060bcd 2019-02-15T16:55:08 [iter] Add hb_all, hb_any, hb_none
Behdad Esfahbod 72dd5e34 2019-02-15T16:11:32 [iter] Make hb_iter() into function-object
Behdad Esfahbod 98be7bd7 2019-02-15T16:09:29 [iter] Make hb_map into function-object
Behdad Esfahbod b8b3b3e3 2019-02-15T16:05:36 [iter] Add hb_enumerate() and use it
Behdad Esfahbod 5b99c92d 2019-02-14T17:10:04 [iter] Use more
Behdad Esfahbod fa35d3fd 2019-02-14T14:04:05 [iter] Add hb_drain
Behdad Esfahbod 0670e1a6 2019-02-14T11:53:40 [iter] Remove excess use of universal references Every time I have to study these to understand why a change is right..
Behdad Esfahbod 773d7563 2019-02-14T11:40:22 [iter] Add hb_apply()
Behdad Esfahbod 00db9409 2019-02-14T11:10:13 [iter] Make hb_filter() a function-object
Behdad Esfahbod aa4c3212 2019-02-14T11:07:12 [iter] Make hb_zip() a function-object
Behdad Esfahbod f8fcfb26 2019-02-14T11:03:29 [iter] Accept pointers to hb_sink()
Behdad Esfahbod b530573a 2019-02-14T11:00:10 [iter] Make hb_sink function-object
Behdad Esfahbod 5fa52e62 2019-02-14T10:51:02 [iter] Accept iterator, not iterable, in hb_sink()()
Behdad Esfahbod 0f292ea8 2019-02-14T10:49:31 [iter] Accept iterator, not iterable, in hb_filter()()
Behdad Esfahbod 345bfbb2 2019-02-14T10:48:20 [iter] Accept iterator, not iterable, in hb_map()()
Behdad Esfahbod b702a0cb 2019-02-14T10:39:58 [iter] Add hb_sink()
Behdad Esfahbod 2d940946 2019-01-30T16:03:16 [iter] Fix mystery crash Fuzzer caught it: ==14==ERROR: AddressSanitizer: stack-use-after-return on address 0x7fca2ed7a3e0 at pc 0x0000006057aa bp 0x7ffc3290f1d0 sp 0x7ffc3290f1c8 READ of size 4 at 0x7fca2ed7a3e0 thread T0 SCARINESS: 55 (4-byte-read-stack-use-after-return) #0 0x6057a9 in OT::SingleSubstFormat2::subset(hb_subset_context_t*) const /src/harfbuzz/src/./hb-ot-layout-gsub-table.hh:194:40 #1 0x5ff921 in hb_subset_context_t::return_t OT::SingleSubst::dispatch<hb_subset_context_t>(hb_subset_context_t*) const /src/harfbuzz/src/./hb-ot-layout-gsub-table.hh:256:13 I can't reproduce locally, but many of the bots are failing because of this as well. It's a pity that operator-> must return pointer. Ugh. Why?!
Behdad Esfahbod 7c292c08 2019-01-30T14:54:23 [iter] Warning fix Not sure why I don't get it, but this warning: warning: base class ‘struct hb_iter_fallback_mixin_t<hb_array_t<const OT::UVSMapping>, const OT::UVSMapping&>’ should be explicitly initialized in the copy constructor [-Wextra]
Behdad Esfahbod e799004e 2019-01-29T17:15:12 [iter] Whitespace
Behdad Esfahbod 849a0f17 2019-01-29T17:10:19 [iter] Add hb_iter_with_fallback_t instead
Behdad Esfahbod 4d40ed9d 2019-01-29T13:55:23 [iter] Add hb_iter_with_mixin_t<>
Behdad Esfahbod 6521d5b2 2019-01-29T13:44:39 [iter] Export operator << / >>
Behdad Esfahbod 84a25d79 2019-01-29T13:39:19 [iter] Rename
Behdad Esfahbod e75b2203 2019-01-28T21:26:23 Move hb_addressof() to hb-meta.hh
Behdad Esfahbod 71157a45 2019-01-28T21:20:12 [meta] Remove _ft struct names Using decltype() instead.
Behdad Esfahbod 57795bc8 2019-01-28T16:23:12 [iter] Add operator>> and operator<<
Behdad Esfahbod 8bd96be9 2019-01-28T16:17:36 [iter] Use auto c = C.iter() internally