ericniebler / range-v3

Range library for C++14/17/20, basis for C++20's std::ranges
Other
4.06k stars 437 forks source link

bug: some easy operator to change the data-vector #1769

Closed JWleo closed 1 year ago

JWleo commented 1 year ago

gcc version :8.5.0 os: centos7 rangev3 version:newest(0.12.0)

picture #1: the code just like below range_bug

picture #2:the result is from upper code. range-result

the easy operator:obj += 100; the action changes the size of array-data. origin_array:[3,6,9]; changed_array:[103].

brevzin commented 1 year ago

Please don't submit issues as images, submit them as text. Also some actual description of what the issue would help.

Yes, mutating a filter while you're iterating over it will break the behavior of that filter if you attempt to reuse it. Don't do that.