daily pastebin goal
16%
SHARE
TWEET

Untitled

a guest Nov 28th, 2018 100 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 );
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top