aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/typename28.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/typename28.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/typename28.C27
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/typename28.C b/gcc/testsuite/g++.old-deja/g++.pt/typename28.C
new file mode 100644
index 00000000000..a538c4d946f
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/typename28.C
@@ -0,0 +1,27 @@
+// Build don't link:
+//
+// Origin: Jens.Maurer@gmx.net
+// Copyright (C) 2001 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 11 Apr 2001 <nathan@codesourcery.com>
+
+// Bug 1844. We can meet types in cp_tree_equal via a template-id-expr.
+
+typedef int *Ptr;
+
+template<class T> struct B
+{
+ typedef typename T::template X<T> type;
+ typedef typename T::template X<Ptr> type2;
+ typedef typename T::template X<int *> type3;
+
+ void foo (type);
+ void baz (type2);
+
+};
+
+template<class T> void B<T>::foo (type)
+{
+}
+template<class T> void B<T>::baz (type3)
+{
+}