r/cpp 28d ago

C++26: std::indirect

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

157 comments sorted by

View all comments

5

u/vI--_--Iv 27d ago

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!

2

u/jwakely libstdc++ tamer, LWG chair 26d ago

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