On 08/02/2024 5:36 AM, Carl Sturtivant wrote:
On Wednesday, 7 February 2024 at 11:49:20 UTC, Richard (Rikki) Andrew
Cattermole wrote:
```
undefined reference to
`_D4core9exception__T15__switch_errorTZQsFNaNbNiNeAyamZv'
collect2: error: ld returned 1 exit status
Error: linker exited with status 1
```
Use ``-allinst``, that is a template emission bug.
!
Thanks, at least I can continue now, though presumably the cure has its
own problems.
```
$ dmd --help | grep allinst
-allinst generate code for all template instantiations
```
Unclear exactly how -allinst does this, given type parameters, and it
will affect all of the many templates I use in source with CodepointSet.
Can you shed any light?
Basically the compiler will by default try to elide templates it thinks
isn't used.
However it doesn't always get this right, which this flag overrides by
turning it off.