Advertisement
Guest User

Untitled

a guest
Nov 28th, 2018
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. mixin Inherits( T )
  2. {
  3.     T base;
  4.     alias base this;
  5. }
  6.  
  7. struct Object1
  8. {
  9.     int foo;
  10. }
  11.  
  12. struct Object2
  13. {
  14.     mixin Inherits!Object1;
  15.     alias base this;
  16.     int bar;
  17. }
  18.  
  19. pragma( msg, Object2.init.foo );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement