inlining
JAnderson
ask at me.com
Fri Jul 18 23:42:19 PDT 2008
Nick Sabalausky wrote:
> "Steven Schveighoffer" <schveiguy at yahoo.com> wrote in message
> news:g5p23e$2iue$1 at digitalmars.com...
>> "dsimcha" wrote
>>> If we're going to make the jump and expose these features to the
>>> programmer, a
>>> noinline attribute to do the opposite might be nice also.
>> Although a noinline directive would be ideal, it is technically possible
>> to force non-inlining of functions by using D interface files (.di) to
>> define the functions as prototypes, and only compile the real code in an
>> object file. But that's a lot of work compared to just tagging the
>> function.
>>
>> Forcing inlining, on the other hand, is impossible currently.
>>
>> -Steve
>
> You could write it as a string mixin.
>
>
What about using a template? Wouldn't that encourage the compiler to
inline?
-Joel
More information about the Digitalmars-d
mailing list