[Issue 18998] Improve Operator Overloading docs

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Dec 10 17:44:18 UTC 2022


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

Nick Treleaven <nick at geany.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nick at geany.org

--- Comment #3 from Nick Treleaven <nick at geany.org> ---
> Press Ctrl-F and type "opSlice", scroll the highlighted text, try and understand how to implement a slicing operator properly. Note that the first contact you see looks like this:
  `-a[i..j]    a.opIndexUnary!("-")(a.opSlice(i, j))`  wat?!

Tweaked unary operator docs so there's now a brief explanation and link to
slice overloading above the lowering table for opIndexUnary:

https://github.com/dlang/dlang.org/pull/3463

--


More information about the Digitalmars-d-bugs mailing list