Advertisement
tinyevil

Untitled

Jul 28th, 2018
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1. struct Foo{
  2.     Point p;
  3. };
  4.  
  5. struct Point{
  6.     int x;
  7.     int y;
  8. };
  9.  
  10. void foo(){
  11.     var foo:Foo;
  12.    
  13.     typeof(foo) == ^Foo
  14.     typeof(foo.p) == ^Point
  15.     typeof(foo.p.x) == ^int
  16.    
  17.    
  18.     let bar:Foo;
  19.    
  20.     typeof(bar) == (const^)Foo;
  21.     typeof(bar.p) == (const^)Point;
  22.     typeof(bar.p.x) == (const^)int;
  23.    
  24.    
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement