phobos/std/range
Inkrementator b48a877814
Fix chain potentially mutating a stale object (#10643)
The constructor of the result of std.range.chain copies it's input tuple
and then has to check which of the input-ranges in the first non-empty
one. The member function empty is not guaranteed to be const, filter is
probably the most prominent function that has to be "primed". On the
first call to empty(), filter will try to advance all it's input ranges
to the first element that matches the predicate.
For ranges with full value semantics, using the old input object instead
of the new internal buffer means that the work of priming is done twice.
If any ranges have reference semantics, the references gets advances,
but the value-semantic parts of the range-composition gets reset.

This fixes #10561 and #9877
2025-02-20 06:23:34 +08:00
..
interfaces.d RandomFiniteAssignable incorrectly referenced as RandomAccessAssignable in ddoc index (#10630) 2025-01-24 06:11:51 +08:00
package.d Fix chain potentially mutating a stale object (#10643) 2025-02-20 06:23:34 +08:00
primitives.d Fix D-Scanner linting issues (#9070) 2024-10-27 01:21:56 -07:00