Date: Fri, 10 Oct 2025 21:19:06 +0000
Why doesn't C++ have allocator-aware versions of uninitialized memory algorithms? Currently, both the STL<https://github.com/microsoft/STL/blob/db9ac249d5b75bf080fd81b4dfa06278c1206c2e/stl/inc/xmemory#L1883> and libstdc++<https://github.com/gcc-mirror/gcc/blob/6a77bf08e5a5fb1554ff99b231c4a9ae2d3f1149/libstdc%2B%2B-v3/include/bits/stl_uninitialized.h#L618> have implemented them because standard library containers require them. libc++ has not implemented them, but perhaps worse, each container implements them in its own way. These functions (which should now be algorithm function object) should be standardized so that current and future authors of allocator-aware containers don't have to reinvent them themselves.
Received on 2025-10-10 21:19:13
