Menu
Home
Create new Paste
Log in
Code
Theme: cobalt
Theme: eclipse
Theme: elegant
Theme: monokai
Theme: neat
Theme: night
Theme: rubyblue
import std.stdio; template isType(alias s) { enum isType = !__traits(compiles,mixin("typeof(s)")); } void main() { int i; writeln(isType!i);// Error: template instance isType!(int) isType!(int) does not match template declaration isType(alias s) writeln(__traits(compiles,mixin("typeof(int)")));//write: false }
Result:
Success
/
Return code: 0
/
Compilation time:
0.303
seconds
/
Run time:
0
seconds
Disassembly
Application output:
false
false
Username
Message
Add comment
Paste info
Author:
dav1d
Views:
169
Private:
no
Expires:
Never
Uploaded:
07.08.12 11:17
Votes
:
0
Tweet
Compilation
Compiler:
DMD 2.062
Pointer size:
m64
Actions
Download
Fork
Raw
×
Confirm
Are you sure you want to delete this paste?
There's no way back!
×
Confirm
Reason