Hacker News .hnnew | past | comments | ask | show | jobs | submitlogin

If you declare using an invalidated iterator as UB, the compiler can optimize as if the container was effectively immutable during the loop.


Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: