Function overloading

Vladimir v.voinkov at gmail.com
Tue Jul 31 04:54:18 PDT 2007


Ok, it works for that case.

I'm playing with string template parameters. It's a kind of miracle for me, a c++ programmer. I made a precompiled wildcard match and would like static version to overload as follows:

bool wildcardMatch (T : char[]) (T wild, T str) // general case
{
    return false;
}

bool wildcardMatch (char[] W) (T str) // static case
{
    return false;
}

void main()
{
    wildcardMatch ("*", "123");
    wildcardMatch !("*") ("123");
}

Is that posible?


More information about the Digitalmars-d-learn mailing list