Best way to add templated "intrinsic" functions?
kinke
noone at nowhere.com
Tue Jan 5 17:00:32 UTC 2021
On Sunday, 3 January 2021 at 16:54:57 UTC, Ola Fosheim Grøstad
wrote:
> Is there a better way than adding the functions to object.d in
> the d-runtime and mark them as "pragma(inline,true"?
That's how I would do it, and I don't think it's too bad.
Adding to object.d is in line with other to-template-lowerings;
one-liners etc. are probably fine to add directly, more complex
functions can be imported and aliased in object.d. [I think
object.d needs to be split up to a little library or package at
some point...]
And `pragma(inline, true)` is fine for your needs.
More information about the digitalmars-d-ldc
mailing list