Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>fixing the lifetime of temporaries in range-for loops

Could anyone expand on how this was broken?



This was not what I thought it was. I assumed it was the `for(auto f : <collection of class>)` issue that STL tried to fix and gave up on. Turns out it was initializers and locks. Extending them to live as long as the loop much like the `if` initializer syntax does for the block.

https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p27...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: