public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-225] libstdc++: Add testcase for std::pair as a structural type [PR 97930]
@ 2021-04-28 17:17 Jonathan Wakely
  0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2021-04-28 17:17 UTC (permalink / raw)
  To: gcc-cvs, libstdc++-cvs

https://gcc.gnu.org/g:c8767ee9f9355a63bfeb8318df32bc39c5b0f3ad

commit r12-225-gc8767ee9f9355a63bfeb8318df32bc39c5b0f3ad
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Wed Apr 28 18:14:05 2021 +0100

    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.

Diff:
---
 libstdc++-v3/testsuite/20_util/pair/requirements/structural.cc | 9 +++++++++
 1 file changed, 9 insertions(+)

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 00000000000..d4df20197ee
--- /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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-28 17:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-28 17:17 [gcc r12-225] libstdc++: Add testcase for std::pair as a structural type [PR 97930] Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).