Getting the names of all the top-level functions in module
Stefan Koch
uplink.coder at googlemail.com
Tue Sep 21 13:58:48 UTC 2021
On Tuesday, 21 September 2021 at 13:29:44 UTC, Stefan Koch wrote:
> Hello there,
> Note that on the "callsite" you have to instantiate the helper
> template as:
> `static const fNames = functionNames!(mixin(__MODULE__))`;
>
Correction you can't actually use it like that.
Because that introduces a symbol into the module you are trying
to reflect over, and the compiler will complain about a `circular
reference` to `fNames`.
you have to use it directly you cannot assign it to a module
level variable.
ah well :-)
More information about the Digitalmars-d
mailing list