r/cpp • u/User_Deprecated • Aug 26 '26
C++26: std::inplace_vector
https://www.sandordargo.com/blog/2026/08/26/cpp26-inplace-vector
181
Upvotes
r/cpp • u/User_Deprecated • Aug 26 '26
View all comments
6
u/Defenestrator__ Aug 29 '26
I feel like this doesn't actually handle the use cases I would want this for, which is where the size in unknown but usually small.
absl::InlinedVectorseamlessly falls back to acting like a normalstd::vectorwhen it grows beyond N, and without that feature this has much more limited usefulness unfortunately. Still better than nothing I guess.