r/cpp • • Aug 13 '26

C++26: std::indirect

https://www.sandordargo.com/blog/2026/08/12/cpp26-indirect
164 Upvotes

157 comments sorted by

View all comments

Show parent comment

2

u/wyrn Aug 14 '26

I just explained that it is not in fact ten times worse.

it is a relatively tame bug.

I just explained that it isn't.

It might not even affect the program state to begin with,

Same goes for UB. Is UB "tame"?

Because the memory is not corrupted.

Yet.

but it can also provide a memory vulnerability for an attacker.

So can this, as I just illustrated, and even it happens not to, other vulnerabilities are possible. Use-after-move is never ok, whether or not it happens to be instantly UB.