From: Giovanni Bajo Date: Mon, 23 Feb 2004 05:13:23 +0000 (+0000) Subject: re PR c++/14143 (Overeager ADL) X-Git-Tag: releases/gcc-4.0.0~9927 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=615a5ba6b1c6f787b952541c5b727107f351aa43;p=thirdparty%2Fgcc.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 a69f71ee81fb..a9411261ebff 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 000000000000..d54bb75430c5 --- /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()); +}