Getting all types defined in a module at compile time
Paul Backus
snarwin at gmail.com
Tue Nov 19 01:55:17 UTC 2019
On Monday, 18 November 2019 at 21:48:00 UTC, Ben Jones wrote:
> template notmodule(alias T){
> alias notmodule = __traits(isModule, T);
> }
>
> [...]
>
> I get errors:
>
> ```
> (on the alias notmodule line) Error: trait isModule is either
> invalid or not supported in alias
> ```
The result of __traits(isModule, T) is a boolean value, so the
line should be
enum notmodule = __traits(isModule, T);
More information about the Digitalmars-d-learn
mailing list