2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.dg / template / qual2.C
blobaa6b10ea4a5bae865b0be8b2f0de44fc9d5896f8
1 // { dg-do run }
3 // Copyright (C) 2003 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 23 Jan 2003 <nathan@codesourcery.com>
6 // PR9415. Forgot a lookup was scoped
8 int here;
9 int there;
11 struct B
13   virtual int activate() {return !here++;}
16 template <class K>
17 struct TPL : public B
19   int activate()
20   {
21     return !there++ && B::activate();
22   }
25 int main ()
27   TPL<int> i;
28   return !i.activate ();