Advertisement
KonstantIMP

Untitled

Aug 1st, 2021
2,433
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
D 0.23 KB | None | 0 0
  1. import std.stdio;
  2.  
  3. mixin template stringConstruct () {
  4.     public this (string a) { writeln(a); }
  5. }
  6.  
  7. class testClass {
  8.     mixin stringConstruct;
  9. }
  10.  
  11. int main (string [] args) {
  12.     auto b = new testClass("aaa");
  13.     return 0;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement