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

           Summary: Please allow pure functions with input known at
                    compile time to be executed at compile time
           Product: D
           Version: 2.031
          Platform: All
               URL: http://www.digitalmars.com/webnews/newsgroups.php?art_
                    group=digitalmars.D&article_id=93790
        OS/Version: Mac OS X
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: a...@mailinator.com


Distinction between compile-time and run-time arguments is not intuitive when
the input is constant and function is pure:


pure bool isEmptyString(string str) {        
    static if (str == "") return true;
    return false;
}

void main()
{
    static if (isEmptyString(""))
    {
        pragma(msg,"works?");
    }
}

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

Reply via email to