The trouble is caused by the use of the void[] buffer, which is cast to the right type, and the cast fails in CTFE.
Comment #1 by greeenify — 2016-03-04T12:59:22Z
Hmm I tried to hack it with:
```
alias CT = CommonType!(ElementType!(Unqual!R1), ElementType!(Unqual!R2));
```
It works well for the runtime, but in CTFE one still gets `cast from int* to int[]* is not supported`.
Using CT[] compiles in CTFE, but returns garbage.
Comment #2 by ali.akhtarzada — 2018-01-01T23:07:12Z
Is there a workaround for this hidden in someone's head? I.e. anyway around the void[] buffer, or is it viable to allow casts in CTFE to make this succeed?
Comment #3 by greensunny12 — 2018-01-01T23:29:29Z
No workaround needed, just use dmd-nightly or the upcoming 2.078 release (will be released in the next hours or tomorrow).
Example: https://run.dlang.io/is/ss9U1c
This was fixed in https://github.com/dlang/phobos/pull/5677, but wasn't referenced (hence no changelog nor auto-closing of this issue).
Comment #4 by ali.akhtarzada — 2018-01-02T00:58:39Z