alias and UDAs
Andre Pany via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu May 11 04:33:42 PDT 2017
On Thursday, 11 May 2017 at 10:57:22 UTC, Stanislav Blinov wrote:
> On Thursday, 11 May 2017 at 10:39:03 UTC, Andre Pany wrote:
>> [...]
>
> It should've been
>
> alias FooList = @Flattened Foo[];
>
> which will generate a compile-time error (UDAs not allowed for
> alias declarations).
>
> And then:
>
> static assert(hasUDA!(baz.fooList2, Flattened));
>
> No quotes, since Flattened is an enum, not a string
Thanks for the explanation. I think I will create a bug report
for this statement:
@Flattened alias FooList = Foo[];
The UDA has no effect as far as I understand.
Kind regards
André
More information about the Digitalmars-d-learn
mailing list