Proposal for new compiler built-ins: __CTX__ and __CONTEXT__

Andrej Mitrovic andrej.mitrovich at gmail.com
Sat Jun 24 08:48:36 UTC 2023


On Saturday, 24 June 2023 at 08:47:36 UTC, Andrej Mitrovic wrote:
> On Thursday, 22 June 2023 at 19:49:31 UTC, ryuukk_ wrote:
>> ```D
>> void infoStack(string msg) {
>>     enum file = __traits(context, calling_file);
>>     enum line = __traits(context, calling_line);
>>     writefln("%s(%s): %s", file, line, msg);
>> }
>> ```
>
> I'm not sure how this could work with separate compilation?

Apologies, others already responded to this and I didn't catch 
it. :)


More information about the Digitalmars-d mailing list