Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- 1. Isolated name spaces
- */
- // no name conflict
- namespace foo{
- struct Foo{
- ...
- }
- }
- namespace bar{
- struct Foo{
- ...
- }
- }
- /*
- 2. Hide rarely used stuff
- */
- namespace helpers{
- function i_am_rarely_used();
- struct Utility{
- }
- function work_with_utility();
- }
- struct MyType{
- }
- function do_something_with_mytype();
- /*
- 3. Re-export stuff from other units/namespaces
- */
- namespace facade{
- public import math_functions_1;
- public import math_functions_2;
- ...
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement