summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/using2.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/using2.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/using2.C26
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/using2.C b/gcc/testsuite/g++.old-deja/g++.pt/using2.C
new file mode 100644
index 000000000..27ae74a0f
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/using2.C
@@ -0,0 +1,26 @@
+// { dg-do assemble }
+//
+// Copyright (C) 2001 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 22 May 2001 <nathan@codesourcery.com>
+
+// Bug 2184. Using decls in templates weren't doing the right thing.
+
+namespace N {
+ template <class T>
+ class vector {};
+}
+
+void g(const int&) {
+ using N::vector;
+ typedef vector<int> V;
+}
+
+template <class J>
+void f(const J&) {
+ using N::vector;
+ typedef vector<int> V;
+}
+
+int main() {
+ f(0);
+}