Hacker News new | ask | show | jobs
by E6300 3578 days ago
If a pointer/reference escapes the loop you'll have problems whether the thing to the right of the colon is a reference or a copy. If it's a copy, the escaped reference will definitely be invalid once that iteration complete. If it's a reference, it will remain valid in more situations.
1 comments

Yes, I believe that's what I was saying, but your comment sounds like it is disagreeing. Could you clarify?
Oh, okay, then. I thought you were saying that that was a problem specific to iterating by reference.