language: C++ 4.7.2 (gcc-4.7.2)
date: 222 days 7 hours ago
link:
visibility: public
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
28
29
30
31
32
class A {
 public:
  class B {public: bool value;};
 
  A() {
      DoStuff(b_);
  }
  B b_;
 private:
  virtual void DoStuffImpl(B& b) = 0;
  void DoStuff(B& b) { return DoStuffImpl(b); }
};
 
class X : public A {
  // ...
 private:
  virtual void DoStuffImpl(B& b);
  void UseBForSomethingElse(B& b);
};
 
void X::DoStuffImpl(B& b) {
    UseBForSomethingElse(b);
}
 
void UseBForSomethingElse(B& b) {
    b.value = true;
}
 
int main(){
    X x;
    return x.b_.value;
}
prog.cpp:25: error: variable or field ‘UseBForSomethingElse’ declared void
prog.cpp:25: error: ‘B’ was not declared in this scope
prog.cpp:25: error: ‘b’ was not declared in this scope