Test double ended specializations#807
Conversation
Similar to `test_specializations` but for `DoubleEndedIterator::{rfold,nth_back}`.
The other difference is that in the macro, I advance the iterator alternatively from both fronts 8 times instead of one front 5 times.
Note that we don't have any `rfold/nth_back` specialization yet but it will come as I intend to do `rfold` specializations alongside `fold` ones.
I previously forgot `repeat_n`.
phimuemue
left a comment
There was a problem hiding this comment.
Thanks, looks good to me.
A thought: Should we make test_specializations a macro that by default checks Iterator and DoubledEndedIterator (and all other specialized things), and only omits checks them if actively opted-out?
|
@phimuemue So opt-in or opt-out? I sure would prefer to merge those two functions in whatever form that detect if it needs to be done or not (I mean, checking if each of them should have a double ended test was not really quick to do), here and for benchmarks. But I don't see a way to do it. |
We don't have any
rfold/nth_backspecialization yet but it will come as I intend to dorfoldspecializations alongsidefoldones (benchmarks are ready too).Apart from
rciterfor which I did not add any specialization test, all our double ended iterators are included here.