Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace test {
- // visible to everyone who can refer to test
- public struct Foo {}
- // only visibile to someone within test (children namespaces included)
- private struct Bar {}
- // custom visibility scope
- public scope myscope;
- // visible to everyone who can name both myscope and test
- struct myscope::Mix {}
- }
- // so, in a different namespace...
- namespace other {
- test.Foo; // ok
- test.Bar; // not ok
- test.Mix; // not ok
- test.(test.myscope::Mix); // ok, but ugly
- use scope test.myscope;
- test.Mix; // now its ok
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement