How can we call a func template instance using the Mars vendor already ?

monkyyy crazymonkyyy at gmail.com
Thu Feb 19 18:35:55 UTC 2026


On Thursday, 19 February 2026 at 18:24:32 UTC, user1234 wrote:
> On Thursday, 19 February 2026 at 18:15:41 UTC, monkyyy wrote:
>> On Thursday, 19 February 2026 at 18:08:24 UTC, user1234 wrote:
>>> 
>>>> Error: function `onlineapp.OK` label 
>>>> `_D9onlineapp__T2okHVii1ZQjFNaNbNiNfZi` is undefined
>>
>> mangles suck and need to be updated for tiny details
>>
>> ```
>> module onlineapp;
>>
>> int ok(int i)(){return i;}
>>
>> enum mangle=ok!1.mangleof;
>> mixin("extern(C) int "~mangle~"();");
>>
>> void OK()
>> {
>>     mixin("asm{call "~mangle~";}");
>> }
>>
>> int main()
>> {
>>     OK();
>>     return 0;
>> }
>> ```
>
> Thanks for your time Adam. I think this is just an example of 
> bug in "speculative template instantiation". Curious that this 
> happens within a single module tho.

which number of adam did you confuse me with?

1: :3
2: >:(


More information about the Digitalmars-d-learn mailing list