www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7769] New: relax inout rule doesn't work for template function

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7769

           Summary: relax inout rule doesn't work for template function
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: k.hara.pg gmail.com



In 2.059head, inout rule was relaxed properly.
Therefore, following code should work.

void f(K)(inout(K) value){}
void main()
{
    f("abc");
}

But it raisees errors:
Error: template test.f(K) does not match any function template declaration
Error: template test.f(K) cannot deduce template function from argument types
!()(string)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 24 2012
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7769


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull



https://github.com/D-Programming-Language/dmd/pull/840

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