Dealing with raw types as attributes
Neia Neutuladh
neia at ikeran.org
Fri Nov 2 04:18:47 UTC 2018
On Fri, 02 Nov 2018 04:01:00 +0000, Nicholas Wilson wrote:
> By noting that all (interesting for the purpose of UDA's i.e. not void)
> types have a .init
>
> or you could do
>
> static if (is(typeof(uda) == Foo) || is(uda == Foo))
Which, again, only tests for presence, when I want to check for presence
*and* get the value, which should be Foo.init if the person supplied the
raw type.
More information about the Digitalmars-d-learn
mailing list