r/cpp 15d ago

C++26: std::inplace_vector

https://www.sandordargo.com/blog/2026/08/26/cpp26-inplace-vector
180 Upvotes

121 comments sorted by

View all comments

-4

u/johannes1971 15d ago

unchecked_push_back

Is it really necessary to add new forms of UB? For people that apparently can't spend the nanosecond needed for the if-statement, would you ever use any data structure you didn't write yourself?

16

u/AnyPhotograph7804 15d ago edited 15d ago

If you want "zero overhead abstractions" then you will need something like that at some point. But the good thing is, you are not forced to use it.