Created
May 20, 2015 09:11
-
-
Save PkmX/bb36dd093789075fce33 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
struct B; | |
class C; | |
struct A { | |
A(const B&); | |
A(const C&); | |
private: int var1; | |
}; | |
struct B : A { | |
protected: int var2; | |
}; | |
class C : protected B { | |
}; | |
A::A(const B& b) { b.var1; } // OK | |
A::A(const C& c) { c.var1; } // Invalid | |
int main() { | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment