opCall() in structures

Jesse Phillips jessekphillips at gmail.com
Sun Dec 9 12:42:44 PST 2007


Trying out the example code for opCall and I get a linker error in linux. 
(dmd 1.024)

struct F
{
    int opCall();
    int opCall(int x, int y, int z);
}

void test()
{   F f;
    int i;

    i = f();     	// same as i = f.opCall();
    i = f(3,4,5);	// same as i = f.opCall(3,4,5);
}

void main() {
    test()
}


More information about the Digitalmars-d-learn mailing list