DIP 84: Static Inheritance
Walter Bright via Digitalmars-d
digitalmars-d at puremagic.com
Sat Oct 31 01:38:01 PDT 2015
On 10/30/2015 7:39 AM, Atila Neves wrote:
> Please let me know what you think.
Thanks for writing this. I think it's a very creative solution.
I've used the static assert technique you mentioned in the DIP. It solves the
first part of the problem, that of shifting the detection of the error from the
usage of the struct to the definition of the struct.
The remaining problem is the suppression of the error message detailing why it
failed the test. Perhaps a more general solution is a __traits(compiles, expr)
feature that does not suppress error messages.
More information about the Digitalmars-d
mailing list