[Issue 5474] New: unaryFun byRef is borked for custom parameter name

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jan 22 01:45:43 PST 2011


http://d.puremagic.com/issues/show_bug.cgi?id=5474

           Summary: unaryFun byRef is borked for custom parameter name
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: patch
          Severity: enhancement
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: simen.kjaras at gmail.com


--- Comment #0 from Simen Kjaeraas <simen.kjaras at gmail.com> 2011-01-22 01:43:41 PST ---
std.functional.unaryFun fails if byRef is true and parmName != "a".

Patch:

        static if (byRef)
        {
            Body!(ElementType).ReturnType result(ElementType)(ref ElementType
__a)
            {
                mixin("alias __a "~parmName~";");
                mixin(Body!(ElementType).code);
            }
        }

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list