aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg5.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg5.C')
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg5.C17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg5.C b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg5.C
new file mode 100644
index 0000000..0821fc0
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg5.C
@@ -0,0 +1,17 @@
+// Only print template subst context when it isn't redundant.
+// { dg-require-effective-target c++11 }
+// { dg-prune-output "error" }
+
+template<class T> struct A { typedef typename T::type type; };
+
+template <class T, class U = typename A<T>::type>
+void f(T);
+
+template <class T, class U = typename T::type>
+void g(T);
+
+int main()
+{
+ f(1); // { dg-message "required from here" }
+ g(1); // { dg-bogus "required from here" }
+}