What does 'inline' mean?

Steven Schveighoffer schveiguy at gmail.com
Wed Jun 10 13:55:40 UTC 2020


On 6/9/20 8:20 PM, Stefan Koch wrote:
> On Wednesday, 10 June 2020 at 00:02:09 UTC, H. S. Teoh wrote:
>> On Tue, Jun 09, 2020 at 04:48:17PM -0700, Walter Bright via 
>> Digitalmars-d wrote:
>>> [...]
>> [...]
>>> [...]
>> [...]
>>
>> Yeah, I was about to say, judging from what Manu has written several 
>> times in this thread, his concept of 'inline' bears striking 
>> resemblance to a template function:
>>
>> [...]
> 
> Yes making the function a function template will do that.
> And Manu is fully aware of it.
> 
> It's a nasty hack.
> And in certain cases it screws with overload-resolution.

It's not exactly the same. If the compiler thinks an imported module has 
instantiated it, it will not include it in the object file (unless you 
use -allinst).

-Steve


More information about the Digitalmars-d mailing list