3 ms·
The C++ allocator interface really needs to support realloc. Vector, in many cases, could avoid copying elements, particularly in cases where the move construct
by quotemstr 7y ago
The C++ allocator interface really needs to support realloc. Vector, in many cases, could avoid copying elements, particularly in cases where the move constructor is trivial --- e.g., vector<int>.
- leni536 7y agoIt's a shame we don't have "destructive move"/relocation yet. Many more objects are trivially relocatable than trivially movable.