www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13933] New: templatize object.opEquals

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

          Issue ID: 13933
           Summary: templatize object.opEquals
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: druntime
          Assignee: nobody puremagic.com
          Reporter: ag0aep6g gmail.com

(as requested [1])

Currently object.opEquals is declared as
    bool opEquals(Object lhs, Object rhs);

Templatizing that like
    bool opEquals(L, R)(L lhs, R rhs);
could avoid virtual calls when possible.

[1] http://forum.dlang.org/post/m8aicl$jkt$1 digitalmars.com

--
Jan 04 2015