Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.pt/enum14.C

raw
1 // { dg-do assemble }
2 // Copyright (C) 2000 Free Software Foundation, Inc.
3 // Contributed by Nathan Sidwell 4 Oct 2000 <[email protected]>
4 // Origin: bug 511 [email protected]
5
6 // Bug 511. We failed to set access correctly for enumeration members of
7 // template classes
8
9 template <class>
10 class A
11 {
12 public:
13 enum foo {bar};
14 typedef int baz;
15 };
16
17 struct C: public A<int>
18 {
19 void choke (foo);
20 void choke (baz);
21 };
22
23 template <class>
24 struct B
25 {
26 private:
27 enum foo {bar}; // { dg-message "" } private
28 typedef int baz; // { dg-message "" } private
29 };
30
31 struct D: public B<int>
32 {
33 void choke (foo); // { dg-error "" } within this context
34 void choke (baz); // { dg-error "" } within this context
35 };
36