Turn Expr into a proper range instead of a view - #593
Conversation
Previously, the Expr implementation used range-v3's view facade to implement range semantics on Expr objects. However, views are different things from containers which had some more or less subtle consequences. See also https://stackoverflow.com/a/31462435 This commit replaces the view facade with virtual begin/end implementations returning ExprIterator objects. Hence, Expr is now a fully fledged container that is usable as a random-access range.
|
Okay, I'll have to change the impl to make some protected helper functions like |
This avoids the issue of not being able to shadow begin/end in subclasses as shadowing is not allowed for virtual functions.
|
Post-merge review of this PR turned up three defects; #594 fixes them, with a regression test for each.
#594 also moves |
Previously, the Expr implementation used range-v3's view facade to
implement range semantics on Expr objects. However, views are different
things from containers which had some more or less subtle consequences.
See also https://stackoverflow.com/a/31462435
This PR replaces the view facade with virtual begin/end
implementations returning ExprIterator objects. Hence, Expr is now a
fully fledged container that is usable as a random-access range.