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

-5

u/NilacTheGrim Aug 14 '26

The motivation was not to save space, though?

Of course it is. Aside from pimpl paradigm.. Why else would you anybody even really bother to use this thing unless it is to save space in a class's inherent sizeof()?

5

u/wyrn Aug 14 '26

Why do you ever use unique_ptr (without custom deleter)?