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

           Summary: Parameter Names Should Be Visible In Function Template
                    Constraints
           Product: D
           Version: 2.016
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzi...@digitalmars.com
        ReportedBy: dsim...@yahoo.com


void doStuff(T)(T arg)
if(is(typeof(arg))) {
}

void main() {
    doStuff(1);
}

Results:

test7.d|6|template test7.doStuff(T) if (is(typeof(arg))) does not match any
function template declaration|
test7.d|6|template test7.doStuff(T) if (is(typeof(arg))) cannot deduce
template function from argument types !()(int)

I assume the reason this does not compile is because the symbol arg is not
visible from the template constraint.


-- 

Reply via email to