]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c++: Add testcase for already fixed PR [PR94508]
authorPatrick Palka <ppalka@redhat.com>
Thu, 22 Apr 2021 21:47:02 +0000 (17:47 -0400)
committerPatrick Palka <ppalka@redhat.com>
Thu, 22 Apr 2021 21:47:02 +0000 (17:47 -0400)
We correctly accept this testcase since r11-8144.

gcc/testsuite/ChangeLog:

PR c++/94508
* g++.dg/cpp2a/concepts-uneval3.C: New test.

gcc/testsuite/g++.dg/cpp2a/concepts-uneval3.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-uneval3.C b/gcc/testsuite/g++.dg/cpp2a/concepts-uneval3.C
new file mode 100644 (file)
index 0000000..7fc4065
--- /dev/null
@@ -0,0 +1,9 @@
+// PR c++/94508
+// { dg-do compile { target c++20 } }
+
+template <class T>
+struct A {
+  void f() requires (this, true) { }
+};
+
+template struct A<int>;