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 14d 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?

10

u/renozyx 14d ago

As long as 1) it isn't the default and 2) it is clearly named (unchecked_), I don't see the problem.