What does 'inline' mean?

Stefan Koch uplink.coder at googlemail.com
Thu Jun 11 10:43:21 UTC 2020


On Thursday, 11 June 2020 at 10:05:14 UTC, Walter Bright wrote:
> On 6/10/2020 1:10 PM, kinke wrote:
>> TLDR: Templates, with the current emission scheme, can 
>> definitely not be used to emit a function into every 
>> referencing CU.
>
> Yes, but in Manu's case the idea is to not need to link with a 
> library. It's hard to see how the compiler would know that a 
> template was instantiated in a library - meaning it'll emit an 
> instance for at least one of the modules given on the command 
> line.
>
> That should resolve the particular issue Manu was having.

The Idea is to be able to have a "header-only" library where 
importing is enough to use it.
Which will only (transitively) draw in  the functionality used.
While it is possible with nullary templates it is dissatisfying, 
dissatisfying enough to cause a busy person like Manu to write a 
post about it.




More information about the Digitalmars-d mailing list