Last active
July 17, 2018 18:10
-
-
Save alexcohn/0c10b0f4154ed0b40b3522985b8972b0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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