[libcxx-commits] [libcxx] [libc++] Partially implement LWG3187 for `polymorphic_allocator` (PR #171090)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Dec 12 00:58:46 PST 2025
================
@@ -67,21 +73,25 @@ template <class _Type, class _Alloc, class... _Args>
_LIBCPP_HIDE_FROM_ABI constexpr _Type __make_obj_using_allocator(const _Alloc& __alloc, _Args&&... __args);
template <class _Pair>
-struct __uses_allocator_construction_args<_Pair, __enable_if_t<__is_cv_std_pair<_Pair>>> {
+struct __uses_allocator_construction_args<_Pair, true> {
template <class _Alloc, class _Tuple1, class _Tuple2>
static _LIBCPP_HIDE_FROM_ABI constexpr auto
__apply(const _Alloc& __alloc, piecewise_construct_t, _Tuple1&& __x, _Tuple2&& __y) noexcept {
return std::make_tuple(
+# if _LIBCPP_STD_VER >= 20
piecewise_construct,
+# else
+ std::ref(piecewise_construct),
----------------
frederick-vs-ja wrote:
The difference between `piecewise_construct_t&&` and `const piecewise_construct&` doesn't seem observable to `polymorphic_allocator` in C++17. Probably I should revert changes around it.
https://github.com/llvm/llvm-project/pull/171090
More information about the libcxx-commits
mailing list