On Thursday, 27 May 2021 at 10:27:42 UTC, Tariq Siddiqui wrote:
Thanks for your answer, -betterC works well with simple code but when using templates in code -betterC compilation failed.

Templates are supported in -betterC, what's not supported can be found here:
https://dlang.org/spec/betterc.html#consequences

You're probably using or importing something that depends on Druntime.
For LDC, you can try adding this instead of using `-betterC`:

```
pragma(LDC_no_moduleinfo);
```

Though once you use non-betterC functions, your assembly will easily get messy compared to C's assembly.

Reply via email to