function overload with mixin template bug?
Adam D. Ruppe via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed May 17 06:26:36 PDT 2017
On Wednesday, 17 May 2017 at 13:13:06 UTC, Patric Dexheimer wrote:
> Function overloads coming from mixin templates are not being
> detected ?
A name being present in the struct means that name is NOT pulled
from the mixin template. This is a feature, not a bug. It allows
overriding of mixin template individual behavior. see:
http://arsdnet.net/this-week-in-d/sep-27.html
To bring in the mixin overloads in addition to your current ones
instead of overriding, use alias:
mixin Foo some_name;
alias foo = some_name.foo;
void foo() {} // now they are all combined
More information about the Digitalmars-d-learn
mailing list