This test got fixed by r10-1976-gdaaa6fcc70ffe66bd56f5819ad4ee78fecd54bb6
so let's add it to the testsuite.

Tested x86_64-pc-linux-gnu, applying to trunk.

        PR c++/88092
        * g++.dg/cpp2a/nontype-class31.C: New test.
---
 gcc/testsuite/g++.dg/cpp2a/nontype-class31.C | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 gcc/testsuite/g++.dg/cpp2a/nontype-class31.C

diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class31.C 
b/gcc/testsuite/g++.dg/cpp2a/nontype-class31.C
new file mode 100644
index 00000000000..329b3129e1b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class31.C
@@ -0,0 +1,19 @@
+// PR c++/88092
+// { dg-do compile { target c++2a } }
+
+template<typename T>
+struct S {
+ constexpr S(...) { }
+};
+
+template <typename T> S(T) -> S<T>;
+
+template <S s> struct foo { };
+
+template <S s>
+void fn ()
+{
+  auto t = s;
+  foo<t> f1;
+  foo<s> f2;
+}

base-commit: 0de349f108d963219bd59aa374a68c15355236be
-- 
Marek Polacek • Red Hat, Inc. • 300 A St, Boston, MA

Reply via email to