[libcxx-commits] [libcxx] [libc++] LWG3187: P0591R4 reverted DR 2586 fixes to `scoped_allocator_adaptor::construct()` (PR #152424)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Thu Aug 7 00:57:31 PDT 2025


philnik777 wrote:

> > Shouldn't we be able to use the utilities from `uses_allocator_construction.h`?
> 
> I found that there're some behavior differences introduced by [P0591R4](https://wg21.link/p0591r4) and I'm not sure whether the C++20 behavior should be backported.
> 
>     * The mechanisms for P0591R4 recursively handle nested `pair<pair<...>, ...>` while pre-C++20 ones didn't, which was already noticed in P0591R4.
> 
>     * There're small type changes around `allocator_arg_t` and `piecewise_construct_t` (from `const&` to `&&`). This generally doesn't matter in practice but is detectable.

I think we should rather modify the utilities to have the required behaviour in C++17. Using them in these places was the original intent after all. Right now we don't fully implement P0591R4, since we never updated `polymorphic_resource` and `scoped_allocator_adaptor`.

https://github.com/llvm/llvm-project/pull/152424


More information about the libcxx-commits mailing list