Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/lookup/scope-operator1.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 /* PR c++/250 */ |
2 /* { dg-do compile } */ | |
3 | |
4 template <class T> void Bar(T *p) | |
5 { | |
6 } | |
7 | |
8 template <class T> class Foo | |
9 { | |
10 public: | |
11 Foo(T *p) { Bar(p); } | |
12 // The global scope operator wasn't respected in this case under gcc 3.0 | |
13 void Bar(T *p) { ::Bar<T>(p); } | |
14 }; | |
15 | |
16 int main() | |
17 { | |
18 double* d; | |
19 Foo<double> f(d); | |
20 } |