Don't get me wrong, the functionality is really useful. But:
Now, most (all?) methods of vector need to be "duplicated" in inplace_vector.
None of the other collections benefit. Not even std::string.
A more general solution to the problem would have been an inplace_allocator -- which requires a different API than allocator -- which could be applied to every container (standard or not).
The solution is some sort of member callable syntax for free functions which was going to happen with operstor |>. The only reason they are members is because of syntax
6
u/matthieum 5d ago
Honestly, I'm a bit saddened by this addition.
Don't get me wrong, the functionality is really useful. But:
vectorneed to be "duplicated" ininplace_vector.std::string.A more general solution to the problem would have been an
inplace_allocator-- which requires a different API thanallocator-- which could be applied to every container (standard or not).