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

4

u/Demiu Aug 14 '26

then accessing such an object is undefined behavior,

Is that indirect specific or a general statement, because if the latter then accessing a moved-from object isin fact NOT automatic UB. For example I think everything in std with clear/reset can be reused if you call that after moving from it

3

u/ericonr Aug 14 '26

Indirect specific.