Debian Codegraph @

gcc/testsuite/g++.dg/template/qual2.C

raw
1 // { dg-do run }
2
3 // Copyright (C) 2003 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 23 Jan 2003 <[email protected]>
5
6 // PR9415. Forgot a lookup was scoped
7
8 int here;
9 int there;
10
11 struct B
12 {
13 virtual int activate() {return !here++;}
14 };
15
16 template <class K>
17 struct TPL : public B
18 {
19 int activate()
20 {
21 return !there++ && B::activate();
22 }
23 };
24
25 int main ()
26 {
27 TPL<int> i;
28 return !i.activate ();
29 }