]> gcc.gnu.org Git - gcc.git/commitdiff
re PR c++/14143 (Overeager ADL)
authorGiovanni Bajo <giovannibajo@gcc.gnu.org>
Mon, 23 Feb 2004 05:13:23 +0000 (05:13 +0000)
committerGiovanni Bajo <giovannibajo@gcc.gnu.org>
Mon, 23 Feb 2004 05:13:23 +0000 (05:13 +0000)
PR c++/14143
* g++.dg/template/koenig5.C: New test.

From-SVN: r78288

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/template/koenig5.C [new file with mode: 0644]

index a69f71ee81fb9e43a928bf3e2f22b1ee4eb47c2b..a9411261ebff24e905ebd009a537a78bbf9fe3b1 100644 (file)
@@ -1,3 +1,8 @@
+2004-02-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
+
+       PR c++/14143
+       * g++.dg/template/koenig5.C: New test.
+
 2004-02-21  Ziemowit Laski  <zlaski@apple.com>
 
        * g++.dg/ext/altivec-1.C: Generalize target triple.
diff --git a/gcc/testsuite/g++.dg/template/koenig5.C b/gcc/testsuite/g++.dg/template/koenig5.C
new file mode 100644 (file)
index 0000000..d54bb75
--- /dev/null
@@ -0,0 +1,32 @@
+// { dg-do compile }
+// Contributed by David Abrahams <dave at boost-consulting dot com>
+// PR c++/14143: Koenig lookup should only look into template arguments only 
+//  if the argument is a template-id.
+
+namespace fu
+{
+  template <class T>
+  struct bar
+  {
+      struct baz {};
+  };
+}
+
+namespace axe
+{
+  struct handle {};
+  
+  template <class T>
+  char* f(T&);
+}
+
+namespace test
+{
+  template <class T>
+  int f(T const&);
+  
+  template <class T>
+  int g(T x) { return f(x); }
+  
+  int x = g(fu::bar<axe::handle>::baz());
+}
This page took 0.096401 seconds and 5 git commands to generate.