blob: abd401b12e5e442a57acd4eef45afda6073ba9ef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
// { dg-do assemble }
// Copyright (C) 2000 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 10 Feb 2000 <nathan@acm.org>
// Test that access to static members from a nested class of the derived
// type works.
class Base
{
protected:
static int Some_var;
typedef int Some_t;
};
class Derived : Base
{
protected:
struct Nested
{
void Foo (Some_t);
void Bar (Base::Some_t) { Base::Some_var = 1; }
};
};
void Derived::Nested::Foo (Some_t) {
Some_var = 2;
}
|