Mixin template functions are ignored in struct

Adam D. Ruppe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Oct 14 14:37:53 PDT 2014


On Tuesday, 14 October 2014 at 20:58:19 UTC, tcak wrote:
> So, thus this mean overloading is not supported with mixin 
> templates?

Nope, what happens is mixin stuff adds items by name. If you have 
a variable or function in the object with the same name, it 
overrides the mixin one entirely.

This is really useful for customizing the behavior of a mixin by 
taking most but not all of its functions.


More information about the Digitalmars-d-learn mailing list