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

0

u/wyrn Aug 14 '26

It's not formally UB in the latter case but it's in a similar ballpark because your own program invariants will be broken, which will lead to unpredictable results regardless.

-4

u/NilacTheGrim Aug 14 '26

Pretending C++ is Rust is the root problem here.

4

u/wyrn Aug 14 '26

It has nothing to do with the R-word.