[Issue 13511] New: std.traits.hasElaborateEquality!T

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Sep 20 09:39:48 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=13511

          Issue ID: 13511
           Summary: std.traits.hasElaborateEquality!T
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: andrei at erdani.com

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.

--


More information about the Digitalmars-d-bugs mailing list