How to preserve function parameters scopeness
Ivan Butygin
ivan.butygin at gmail.com
Thu Jun 6 09:45:08 UTC 2019
I want to extract function parameters types from declaration,
remove some of them and construct new function pointer type from
remaining types. Doing this in obvious way cause
parameters to lost their scope storage class:
https://run.dlang.io/is/cQBFRW
I can extract and store scope information separately via
ParameterStorageClassTuple but I don't know how to apply this
information back when constructing new function pointer type. Of
course I can CTFE string representation with full declaration and
mixin it but it's ugly and probably slow to compile. Any ideas
how to do this better?
I need this for my jit-bind template machinery, if someone
interested
https://github.com/ldc-developers/ldc/blob/master/runtime/jit-rt/d/ldc/dynamic_compile.d#L120
More information about the Digitalmars-d
mailing list