aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/lookup/scope-operator1.C
blob: fde36f01ead9c1c835faf18e7171ff30ba79d626 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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);
}