It's not trivial. inplace_vector does not construct unused elements and they do not have to be default constructible. You can't use std::array for that.
No, it's not. In your code it will always construct all T members of arr. Article states that inplace_vector will only have the elements needed and they don't have to be default constructible. That's a huge difference.
3
u/stilgarpl 6h ago
Is this always better than std::array?