Bug 13511 – std.traits.hasElaborateEquality!T

Status
NEW
Severity
enhancement
Priority
P4
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-09-20T16:39:48Z
Last change time
2024-12-01T16:22:25Z
Assigned to
No Owner
Creator
Andrei Alexandrescu
Moved to GitHub: phobos#10085 →

Comments

Comment #0 by andrei — 2014-09-20T16:39:48Z
std.traits.hasElaborateEquality!T evaluates to true if T defines opEquals or has a member that does, false otherwise. In the latter case, objects may be compared with memcmp. std.traits.hasElaborateEquality should not be implemented for classes: references themselves can always be compared bitwise, and the class objects they refer to will always have elaborate comparison.
Comment #1 by robert.schadek — 2024-12-01T16:22:25Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/10085 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB