re PR c++/14143 (Overeager ADL)

PR c++/14143
	* g++.dg/template/koenig5.C: New test.

From-SVN: r78288
This commit is contained in:
Giovanni Bajo 2004-02-23 05:13:23 +00:00
parent 146d3c99f0
commit 615a5ba6b1
2 changed files with 37 additions and 0 deletions

View 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.

View File

@ -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());
}