mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-11 05:46:51 +08:00
* g++.dg/lookup/scope-operator1.C: New test.
From-SVN: r60743
This commit is contained in:
parent
b959359931
commit
c6df507e88
@ -1,5 +1,7 @@
|
||||
2003-01-01 Nathanael Nerode <neroden@gcc.gnu.org>
|
||||
|
||||
* g++.dg/lookup/scope-operator1.C: New test.
|
||||
|
||||
* g++.dg/parse/operator1.C: New test.
|
||||
|
||||
2003-01-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
|
||||
|
20
gcc/testsuite/g++.dg/lookup/scope-operator1.C
Normal file
20
gcc/testsuite/g++.dg/lookup/scope-operator1.C
Normal file
@ -0,0 +1,20 @@
|
||||
/* PR c++/250 */
|
||||
/* { dg-do compile } */
|
||||
|
||||
template <class T> void Bar(T *p)
|
||||
{
|
||||
}
|
||||
|
||||
template <class T> class Foo
|
||||
{
|
||||
public:
|
||||
Foo(T *p) { Bar(p); }
|
||||
// The global scope operator wasn't respected in this case under gcc 3.0
|
||||
void Bar(T *p) { ::Bar<T>(p); }
|
||||
};
|
||||
|
||||
int main()
|
||||
{
|
||||
double* d;
|
||||
Foo<double> f(d);
|
||||
}
|
Loading…
Reference in New Issue
Block a user