diff mbox series

[pushed] c++: add fixed testcase [PR63378]

Message ID 20231211170004.1393588-1-ppalka@redhat.com
State New
Headers show
Series [pushed] c++: add fixed testcase [PR63378] | expand

Commit Message

Patrick Palka Dec. 11, 2023, 5 p.m. UTC
We accept this testcase since r12-4453-g79802c5dcc043a.

	PR c++/63378

gcc/testsuite/ChangeLog:

	* g++.dg/template/fnspec3.C: New test.
---
 gcc/testsuite/g++.dg/template/fnspec3.C | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 gcc/testsuite/g++.dg/template/fnspec3.C
diff mbox series

Patch

diff --git a/gcc/testsuite/g++.dg/template/fnspec3.C b/gcc/testsuite/g++.dg/template/fnspec3.C
new file mode 100644
index 00000000000..c36cb17751d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/fnspec3.C
@@ -0,0 +1,20 @@ 
+// PR c++/63378
+// { dg-do compile { target c++11 } }
+
+template<class T1, class S1>
+struct B { };
+
+template<class T1>
+struct A {
+private:
+  template<class T2, class S2>
+  static B<T2, S2> g();
+
+public:
+  template<class S2>
+  auto f() -> decltype(g<T1, S2>());
+};
+
+template<>
+template<>
+auto A<int>::f<float>() -> B<int, float>;