r/cpp • u/User_Deprecated • Aug 26 '26
C++26: std::inplace_vector
https://www.sandordargo.com/blog/2026/08/26/cpp26-inplace-vector
183
Upvotes
r/cpp • u/User_Deprecated • Aug 26 '26
View all comments
Show parent comment
6
u/_Noreturn Aug 27 '26
Yes?
Honestly I see this as very very unnecessary, they should instead add
resize_and_overwritestyle init, because where would you realistically use this? because if anything this will have bad performance than a simple memcpy style init. Also the same behavior could be replaced with*try_push_backwhere you always dereference the pointer.