Aggressive conditional inlining with ldc only, not dmd
kinke
noone at nowhere.com
Sun Mar 25 22:30:50 UTC 2018
On Sunday, 25 March 2018 at 22:09:43 UTC, Nordlöw wrote:
> And I haven't found a way to conditionally qualify these inner
> loop functions with `pragma(inline, true)` for the ldc case
> only.
From https://dlang.org/spec/pragma.html#inline: 'If inside a
function, it affects the function it is enclosed by.'
So:
void foo()
{
version(LDC) pragma(inline, true); // affects foo()
...
}
More information about the Digitalmars-d-learn
mailing list