why can't structs implement interfaces?

bearophile bearophileHUGS at lycos.com
Tue Nov 24 14:36:35 PST 2009


Moritz Warning:

> If you only what a contract that certain functions are implemented,
> then it just need to be implemented in the compiler frontend.

In the meantime this can be done with a template mixin, where the template statically asserts the presence of the functions/fields you want.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list