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

6

u/vI--_--Iv Aug 14 '26

std::unique_ptr has two fundamental issues...

First, it breaks const propagation...
Second, it deletes copy operations.

Who would've thought that a unique pointer would behave like 1) pointer; 2) unique.
O tempora, o mores!

4

u/jwakely libstdc++ tamer, LWG chair Aug 15 '26

Yeah you could say it has two fundamental properties, which are usually desirable, but not always.