www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11074] New: Template value parameter defaults behave differently for IFTI and normal instantations

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

           Summary: Template value parameter defaults behave differently
                    for IFTI and normal instantations
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: simen.kjaras gmail.com



PDT ---
void bar(int line = __LINE__)() {
    pragma(msg, line);
}

void main() {
    bar!()();
    bar();
}

The two calls to bar should be equivalent, right? They're not. In the case of
explicit instantiation, __LINE__ is evaluated to be 1, while with IFTI, it is
7.

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