What does 'inline' mean?

Basile B. b2.temp at gmx.com
Mon Jun 8 09:08:33 UTC 2020


On Monday, 8 June 2020 at 08:47:36 UTC, Stefan Koch wrote:
> On Monday, 8 June 2020 at 08:45:02 UTC, Basile B. wrote:
>
>> what if the function address is took in a delegate ?
>> It still needs to be there, in the object matching to the CU 
>> where it is declared, otherwise there will be surprises, e.g 
>> &func in a CU and &func in another will have different 
>> addresses.
>
> I have _never_ compared addresses of inline functions from 
> different CUs.
> How would I even do that?
> by storing the function pointer in a global which is visible 
> from multiple translation units?
> Is that a valid concern?
> Will _any_ project out there break because of that?

It's a detail. I just meant that in case where the address of 
function that is marked for inlining is took then it must still 
be emitted in the object matching to the declaration unit.


More information about the Digitalmars-d mailing list