-
Notifications
You must be signed in to change notification settings - Fork 11.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix violations of [basic.class.scope]p2.
These cases all follow the same pattern: struct A { friend class X; //... class X {}; }; But 'friend class X;' injects 'X' into the surrounding namespace scope, rather than introducing a class member. So the second 'class X {}' is a completely different type, which changes the meaning of the earlier name 'X' from '::X' to 'A::X'. Additionally, the friend declaration is pointless -- members of a class don't need to be befriended to be able to access private members.
- Loading branch information
Showing
4 changed files
with
0 additions
and
7 deletions.
There are no files selected for viewing
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
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
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
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