Overloading Generic and non-generic functions

Andrej Mitrovic none at none.com
Thu Oct 14 10:07:03 PDT 2010


AFAIK the following should be allowed, but it's not (v2.048):

void test(uint) {  }

void test(T)(T value) { }

void main()
{
    test(42);
    test("hello");
}

These end up conflicting with each other. From what I've read in TDPL we should be able to overload generic and nongeneric functions, there's an example in the book similar to this one, but it doesn't work. Has this been filed as a bug already?


More information about the Digitalmars-d-learn mailing list