Advertisement
Guest User

Untitled

a guest
May 13th, 2019
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
D 0.23 KB | None | 0 0
  1. //int foo;
  2. //int bar;
  3.  
  4. enum WillWork = compiles!"int kek = foo + bar;";
  5. enum DoesWork = __traits( compiles, "int kek = foo + bar;");
  6. pragma( msg, "Will work? " ~ WillWork.stringof );
  7. pragma( msg, "Does work? " ~ DoesWork.stringof );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement