tinyevil

Untitled

Jun 19th, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.56 KB | None | 0 0
  1. namespace foo{
  2.     import bar;
  3.    
  4.     // this Bar can be from bar
  5.     // thats the point of imports
  6.     alias Foo = Bar;
  7. }
  8.  
  9. namespace foo{
  10.     // the question is, can this Bar be from bar?
  11.     alias Foo = Bar;
  12.  
  13.     import bar;
  14. }
  15.  
  16. // or, alternatively, we can completely disallow imports
  17. // after the first non-import directive
  18.  
  19. // that interferes with macros, because it is not possible
  20. // to do things like this anymore (Debug can be from foo, so
  21. // first name lookup happens before all imports are presented):
  22. import foo;
  23. static_if ( Debug ) {
  24.     import debug;
  25. }
Add Comment
Please, Sign In to add comment