DIP56 - inlining

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Tue Feb 3 20:46:18 PST 2015


On 2/3/2015 4:24 PM, Mike wrote:
> ...it should read...
>
> pragma(inline, true);  // enable -inline compiler flag
> pragma(inline, false); // disable -inline compiler flag
> pragma(inline);        // use whatever is passed in on the command line
>
> ...as that is really the intent of DIP56 as confirmed by Walter [1].

Well, perhaps I worded that poorly. The compiler has a 'cost' function it uses 
to decide whether to inline or not. The pragma will cause it to ignore the cost 
function and always inline it.



More information about the Digitalmars-d mailing list