[pushed] c++: add fixed testcase [PR63378]
Checks
Commit Message
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
new file mode 100644
@@ -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>;