From 615a5ba6b1c6f787b952541c5b727107f351aa43 Mon Sep 17 00:00:00 2001 From: Giovanni Bajo Date: Mon, 23 Feb 2004 05:13:23 +0000 Subject: [PATCH] re PR c++/14143 (Overeager ADL) PR c++/14143 * g++.dg/template/koenig5.C: New test. From-SVN: r78288 --- gcc/testsuite/ChangeLog | 5 ++++ gcc/testsuite/g++.dg/template/koenig5.C | 32 +++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 gcc/testsuite/g++.dg/template/koenig5.C 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()); +} -- 2.30.2