[libcxx-commits] [libcxx] [libc++] fixing missing forward declarations of uses_allocator_construction_args (PR #67044)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Sep 27 07:48:26 PDT 2023
================
@@ -118,6 +118,15 @@ constexpr bool test() {
assert(std::get<2>(std::get<1>(ret)) == 3);
assert(std::get<0>(std::get<2>(ret)) == 4);
}
+ {
----------------
ldionne wrote:
You can change the test to this:
```
{
// See https://github.com/llvm/llvm-project/issues/66714
{
using NestedPairType = std::pair<int, std::pair<int, UsesAllocArgT>>;
std::same_as<std::tuple<std::piecewise_construct_t,
std::tuple<>,
std::tuple<std::piecewise_construct_t,
std::tuple<>,
std::tuple<std::allocator_arg_t, const Alloc&>>>> auto ret =
test_uses_allocator_construction_args<NestedPairType>(a);
(void)ret;
}
{
using NestedPairType = std::pair<int, std::pair<UsesAllocArgT, int>>;
std::same_as<std::tuple<std::piecewise_construct_t,
std::tuple<>,
std::tuple<std::piecewise_construct_t,
std::tuple<std::allocator_arg_t, const Alloc&>,
std::tuple<>>>> auto ret =
test_uses_allocator_construction_args<NestedPairType>(a);
(void)ret;
}
}
```
It doesn't require using `std::pmr`.
https://github.com/llvm/llvm-project/pull/67044
More information about the libcxx-commits
mailing list