https://issues.dlang.org/show_bug.cgi?id=19337
Nicholas Wilson <iamthewilsona...@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |iamthewilsona...@hotmail.co | |m --- Comment #2 from Nicholas Wilson <iamthewilsona...@hotmail.com> --- Looks like something like https://github.com/dlang/phobos/blob/master/std/complex.d#L656 would help here. /* Makes Complex!(Complex!T) fold to Complex!T. The rationale for this is that just like the real line is a subspace of the complex plane, the complex plane is a subspace of itself. Example of usage: --- Complex!T addI(T)(T x) { return x + Complex!T(0.0, 1.0); } --- The above will work if T is both real and complex. */ template Complex(T) if (is(T R == Complex!R)) { alias Complex = T; } --