From: Giovanni Bajo Date: Mon, 23 Feb 2004 05:13:23 +0000 (+0000) Subject: re PR c++/14143 (Overeager ADL) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=615a5ba6b1c6f787b952541c5b727107f351aa43;p=gcc.git re PR c++/14143 (Overeager ADL) PR c++/14143 * g++.dg/template/koenig5.C: New test. From-SVN: r78288 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a69f71ee81f..a9411261ebf 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2004-02-23 Giovanni Bajo + + PR c++/14143 + * g++.dg/template/koenig5.C: New test. + 2004-02-21 Ziemowit Laski * 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 index 00000000000..d54bb75430c --- /dev/null +++ b/gcc/testsuite/g++.dg/template/koenig5.C @@ -0,0 +1,32 @@ +// { dg-do compile } +// Contributed by David Abrahams +// PR c++/14143: Koenig lookup should only look into template arguments only +// if the argument is a template-id. + +namespace fu +{ + template + struct bar + { + struct baz {}; + }; +} + +namespace axe +{ + struct handle {}; + + template + char* f(T&); +} + +namespace test +{ + template + int f(T const&); + + template + int g(T x) { return f(x); } + + int x = g(fu::bar::baz()); +}