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

           Summary: Generic matching not working with alias parameters
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: and...@metalanguage.com


--- Comment #0 from Andrei Alexandrescu <and...@metalanguage.com> 2010-08-29 
11:46:41 PDT ---
Consider:

struct A(alias pred) {}

void fun(alias pred)(A!(pred) ax) {}

void main()
{
    A!("x") a;
    fun(a);
}

Result:

Error: template test.fun(alias pred) does not match any function template
declaration
Error: template test.fun(alias pred) cannot deduce template function from
argument types !()(A!(""))

The code works as expected if the alias is replaced with a type parameter.

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

Reply via email to