Header-Only Library - pragma(root)

Walter Bright newshound2 at digitalmars.com
Sun Jun 14 10:24:33 UTC 2020


On 6/14/2020 2:52 AM, Mathias LANG wrote:
> https://github.com/dlang/dmd/pull/7099
> It's essentially putting rdmd in the compiler because rdmd was considered too slow.

Thank you. I see I was involved in the discussion.

The issue is then should the implementer of the module decide if it is 
header-only (i.e. pragma(root)) or the caller (-i).

It would probably be better as the implementer, as a header-only library has to 
be designed for it. It also means the user needn't need to set the switches, he 
can just compile.


More information about the Digitalmars-d mailing list