Re:Auto Type Deduction in C++ Range-Based For Loops
by E6300 on Friday September 02, 2016 @12:50PM
(#12414379)
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.
[ Parent
| on HN ]