mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-19 13:10:50 +08:00
re PR c++/14143 (Overeager ADL)
PR c++/14143 * g++.dg/template/koenig5.C: New test. From-SVN: r78288
This commit is contained in:
parent
146d3c99f0
commit
615a5ba6b1
@ -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.
|
||||
|
32
gcc/testsuite/g++.dg/template/koenig5.C
Normal file
32
gcc/testsuite/g++.dg/template/koenig5.C
Normal 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());
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user