static if or version for CTFE

bmeck bmeck at stedwards.edu
Wed Aug 27 22:38:08 PDT 2008


Well im using D1 so if anyone knows of a way that would be lovely, the basics are this:

template foo(char[] src)
{
    static if(src available at compile time for CTFE /*Ie is src const*/)
        blah;
    else
        blah;
}




More information about the Digitalmars-d mailing list