Is there some trait like getOverloads that works with mixin templates?

ArturG via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Nov 26 17:58:26 PST 2016


a simple example:

mixin template v1()
{
     void foo(){}
}

mixin template v2()
{
     void foo(int){}
}

class Test
{
     mixin v1;
     mixin v2;
}

void main()
{
     __traits(getOverloads, Test, "foo").length.writeln; // 0
}

i know you can use alias to manually make them visible for 
getOverloads.
but i could use a automated way, at least for unnamed template 
mixins
or to be able to merge all into the same named mixin scope.

is there a way to do this?


More information about the Digitalmars-d-learn mailing list