aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2021-04-28 18:14:05 +0100
committerJonathan Wakely <jwakely@redhat.com>2021-04-28 18:17:40 +0100
commitc8767ee9f9355a63bfeb8318df32bc39c5b0f3ad (patch)
treefd812f6472c1330ee203d2ea3b8cebfb02115100
parentda4a0817beb506bc1c05d85e783ba6ffd079a194 (diff)
downloadgcc-c8767ee9f9355a63bfeb8318df32bc39c5b0f3ad.zip
gcc-c8767ee9f9355a63bfeb8318df32bc39c5b0f3ad.tar.gz
gcc-c8767ee9f9355a63bfeb8318df32bc39c5b0f3ad.tar.bz2
libstdc++: Add testcase for std::pair as a structural type [PR 97930]
This PR was fixed by r12-221-ge1543e694dadf1ea70eb72325219bc0cdc914a35 (for compilers that support C++20 Concepts) so this adds the testcase. libstdc++-v3/ChangeLog: PR libstdc++/97930 * testsuite/20_util/pair/requirements/structural.cc: New test.
-rw-r--r--libstdc++-v3/testsuite/20_util/pair/requirements/structural.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/20_util/pair/requirements/structural.cc b/libstdc++-v3/testsuite/20_util/pair/requirements/structural.cc
new file mode 100644
index 0000000..d4df201
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/pair/requirements/structural.cc
@@ -0,0 +1,9 @@
+// { dg-options "-std=gnu++20" }
+// { dg-do compile { target c++20 } }
+
+#include <utility>
+
+// C++20 20.4.2 [pairs.pair]
+// pair<T, U> is a structural type (13.2) if T and U are both structural types.
+
+template<std::pair<int, int>> struct S; // PR libstdc++/97930