]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c++: add fixed test [PR70037]
authorMarek Polacek <polacek@redhat.com>
Fri, 14 Feb 2025 20:50:09 +0000 (15:50 -0500)
committerMarek Polacek <polacek@redhat.com>
Fri, 14 Feb 2025 20:50:51 +0000 (15:50 -0500)
Fixed by r11-735 + r11-2417.

PR c++/70037

gcc/testsuite/ChangeLog:

* g++.dg/cpp2a/concepts-pr70037.C: New test.

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

diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr70037.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr70037.C
new file mode 100644 (file)
index 0000000..7382764
--- /dev/null
@@ -0,0 +1,18 @@
+// PR c++/70037
+// { dg-do compile { target c++20 } }
+
+namespace std {
+  template<typename>
+  struct F {
+    static constexpr bool value = false;
+  };
+
+  template<typename T>
+  struct tuple {
+    constexpr tuple() requires (F<T>::value)  {}
+    explicit constexpr tuple() requires (F<T>::value) && (true) {}
+  };
+}
+
+using std::tuple;
+template struct std::tuple<tuple<int>>;