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; import std.algorithm; struct S { char[] c; this(this) pure { c = c.dup; } static if(1) { auto ref opAssign(S other) pure { c = other.c.dup; return this; } } } S foo(S s) pure { S other; other = s; return other; } void main() { S s; S another = foo(s); }
Result:
Success
/
Return code: 0
/
Compilation time:
0.317
seconds
/
Run time:
0.001
seconds
Disassembly
Username
Message
Add comment
Paste info
Author:
Guest
Views:
82
Private:
no
Expires:
Never
Uploaded:
02.12.12 22:44
Parent:
#7ee27db2
Votes
:
0
Tweet
Compilation
Compiler:
DMD 2.x Gi
Pointer size:
m64
Actions
Download
Fork
Raw
×
Confirm
Are you sure you want to delete this paste?
There's no way back!
×
Confirm
Reason