Create an associative array with function pointers as the value

rempas rempas at tutanota.com
Wed Apr 20 14:15:27 UTC 2022


On Wednesday, 20 April 2022 at 11:10:18 UTC, vit wrote:
> You need shared static this for initializing immutable AA:
>
> ```d
> immutable void function(ref file_struct)[string] 
> common_identifiers;
>
> shared static this(){
> 	common_identifiers = [
>       "let"     : &parse_let,
>       // "macro"   : &parse_macro,
>     ];
> }
> ```

Unfortunately, this will not work for me as it uses "TypeInfo" 
and it is not available with "-betterC". Thank you for trying to 
help regardless!


More information about the Digitalmars-d-learn mailing list