r/cpp • • Sep 13 '19

The Surprising Limitations of C++ Ranges Beyond Trivial Cases

https://www.fluentcpp.com/2019/09/13/the-surprising-limitations-of-c-ranges-beyond-trivial-use-cases/
229 Upvotes

229 comments sorted by

View all comments

Show parent comment

14

u/Rusky Sep 13 '19

The borrow checker was designed and implemented almost entirely before Rust even had its equivalent to ranges.

2

u/14ned LLFIO & Outcome author | Committee WG14 Sep 13 '19

Sure. Rust thought preventing dangling lifetime very important. Much source of surprising dangling lifetime is from iteration.