| 1 |
// { dg-do compile { target c++20 } } |
| 2 |
// { dg-require-effective-target hosted } |
| 3 |
|
| 4 |
#include <memory> |
| 5 |
|
| 6 |
struct move_only |
| 7 |
{ |
| 8 |
move_only(move_only&&); |
| 9 |
}; |
| 10 |
|
| 11 |
using P = std::pair<move_only, move_only>; |
| 12 |
|
| 13 |
void |
| 14 |
test_lwg3527(std::pair<move_only&&, move_only&&> rvals) |
| 15 |
{ |
| 16 |
// LWG 3527. uses_allocator_construction_args handles rvalue pairs of |
| 17 |
// rvalue references incorrectly. |
| 18 |
// PR libstdc++/108952 Regression in uses_allocator_construction_args |
| 19 |
// for pair of rvalue references |
| 20 |
std::allocator<move_only> a; |
| 21 |
(void) std::uses_allocator_construction_args<P>(a, std::move(rvals)); |
| 22 |
} |