What does 'inline' mean?
Walter Bright
newshound2 at digitalmars.com
Sat Jun 13 08:33:34 UTC 2020
On 6/12/2020 9:08 PM, Manu wrote:
> If the di file is mentioned on the command line to the compiler
>
> It's not, that's literally the point of a .di file.
No, it isn't. A .di file is more of a convention than a feature. It's a module
and does not get special treatment by the compiler.
> , yes (1)
> instance of it appears in the executable. Otherwise, (0) instances of it appear
> in the executable. There are never 2 or more instances in the executable.
>
> Exactly. And this is not a useful design.
I hate to say it, but these sorts of replies are completely useless to resolving
your issues. You omitted the *why*.
Why can't you put it on the command line?
May I suggest a paradigm shift? A .d (or .di) file is not a .h file and does not
work like .h files other than in a very superficial way. (In fact, .h files do
not work like .h files. The C++ compiler has no idea what a .h file is. The
characteristics you've imputed to it do not exist.)
It's a module. It's fundamentally different. The .h file rules you are used to
do not apply.
You'd never put a .h file on the command line to a C++ compiler. Agreed. But
those well-traveled notions don't apply to modules.
More information about the Digitalmars-d
mailing list