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;
}