8 ms·
If you declare using an invalidated iterator as UB, the compiler can optimize as if the container was effectively immutable during the loop.
by pptr 2y ago
If you declare using an invalidated iterator as UB, the compiler can optimize as if the container was effectively immutable during the loop.