I have written a struct and a mixin template, and that mixin template is mixed into that struct as follows.

private mixin template TestCommonMethods(){
        public bool apply( int d, int e ){
                return false;
        }
}

public struct Test{
        public mixin TestCommonMethods;

        public bool apply( char c ){
                return true;
        }
}

void main(){
        Test t;
        t.apply( 5, 3 );
}

---

For the line "t.apply( 5, 3 );", error is given saying that "function test.apply(char c) is not callable".

---

For better testing, I added another function to template as "public bool blah(){}", and called it in main, and it works. So, thus this mean overloading is not supported with mixin templates?

Reply via email to