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; struct Point { int x, y; bool opEquals(R)(R rhs) { return x == rhs.x && y == rhs.y; } bool opEquals(R)(R rhs) const { return x == rhs.x && y == rhs.y; } } void main() { Point x = Point(1, 2); Point y = Point(1, 2); bool a = x == y; bool b = x.opEquals(y); writeln(a); writeln(b); }
Result:
Success
/
Return code: 0
/
Compilation time:
0.451
seconds
/
Run time:
0.001
seconds
Disassembly
Application output:
true
true
Username
Message
Add comment
Paste info
Author:
dav1d
Views:
158
Private:
no
Expires:
Never
Uploaded:
07.08.12 16:59
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