[Issue 12583] Allow user defined "retro" range

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Apr 18 05:56:23 PDT 2014


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

--- Comment #4 from Jonathan M Davis <jmdavisProg at gmx.com> ---
If myRange.retro() fails, because typeof(myRange) defined retro(int) but not
retro, then that sounds like a bug with UFCS to me. retro(int) doesn't match
myRange.retro(), but std.range.retro does, so std.range.retro should be called
rather than the member function.

If a member function has a different signature than the free function, then
it's not intended as a replacement for the free function, and it shouldn't be
conflicting with the free function at all.

--


More information about the Digitalmars-d-bugs mailing list