@disable("reason")
Adam D. Ruppe
destructionator at gmail.com
Wed Jan 8 13:20:24 UTC 2020
On Wednesday, 8 January 2020 at 00:23:48 UTC, Marcel wrote:
> I would like to tell the user why they can't instantiate the
> struct.
> Is there a way to do that?
I'd love to have exactly what you said for this reason, but D
doesn't really have it. You just have to hope they read the docs
(my doc generator specifically calls out default ctors for this
reason).
But we should formally request @disable("reason") to be added, it
really is very nice and has precedent in deprecated("reason").
More information about the Digitalmars-d-learn
mailing list