November 27, 2016 Is there some trait like getOverloads that works with mixin templates? | ||||
|---|---|---|---|---|
| ||||
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?
| ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply