Skip to content

Instantly share code, notes, and snippets.

@alexcohn
Last active July 17, 2018 18:10
Show Gist options
  • Save alexcohn/0c10b0f4154ed0b40b3522985b8972b0 to your computer and use it in GitHub Desktop.
Save alexcohn/0c10b0f4154ed0b40b3522985b8972b0 to your computer and use it in GitHub Desktop.
#ifndef almost_private
#define almost_private private
#endif
class A {
private:
void Private();
almost_private:
void AlmostPrivate();
}
class B {
A m_a;
void f();
}
#define almost_private public
#include "A.h"
void B::f() {
m_a.AlmostPrivate();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment