Re: pointer cast from const(Y) to immutable(void*)** is not supported at compile time

2018-08-02 Thread kinke via Digitalmars-d-learn
On Thursday, 2 August 2018 at 02:13:41 UTC, Hakan Aras wrote: I do want it at compiletime though. Totally understandable; that's a regression and needs to be fixed. See https://github.com/dlang/dmd/pull/8362#pullrequestreview-142565787.

Re: pointer cast from const(Y) to immutable(void*)** is not supported at compile time

2018-08-01 Thread Nicholas Wilson via Digitalmars-d-learn
On Thursday, 2 August 2018 at 02:13:41 UTC, Hakan Aras wrote: On Thursday, 2 August 2018 at 01:39:58 UTC, Nicholas Wilson wrote: https://issues.dlang.org/show_bug.cgi?id=19134 I wasn't quite sure whether it's a bug since it happens in both compilers. Thanks for opening the issue. For

Re: pointer cast from const(Y) to immutable(void*)** is not supported at compile time

2018-08-01 Thread Hakan Aras via Digitalmars-d-learn
On Thursday, 2 August 2018 at 01:39:58 UTC, Nicholas Wilson wrote: https://issues.dlang.org/show_bug.cgi?id=19134 I wasn't quite sure whether it's a bug since it happens in both compilers. Thanks for opening the issue. As a workaround remove static, as that causes y to be initialised at

Re: pointer cast from const(Y) to immutable(void*)** is not supported at compile time

2018-08-01 Thread Nicholas Wilson via Digitalmars-d-learn
On Wednesday, 1 August 2018 at 20:10:44 UTC, Hakan Aras wrote: On Wednesday, 1 August 2018 at 16:25:28 UTC, Hakan Aras wrote: https://run.dlang.io/is/dSVruv Whoops, that was the wrong one. It's fixed now. https://issues.dlang.org/show_bug.cgi?id=19134 As a workaround remove static, as

Re: pointer cast from const(Y) to immutable(void*)** is not supported at compile time

2018-08-01 Thread Hakan Aras via Digitalmars-d-learn
On Wednesday, 1 August 2018 at 16:25:28 UTC, Hakan Aras wrote: https://run.dlang.io/is/dSVruv Whoops, that was the wrong one. It's fixed now.

pointer cast from const(Y) to immutable(void*)** is not supported at compile time

2018-08-01 Thread Hakan Aras via Digitalmars-d-learn
Why does the following work in DMD 2.080 and LDC 1.10, but not in DMD 2.081 and LDC 1.11 beta: https://run.dlang.io/is/dSVruv And is there a way to enforce the cast like a static_cast in C++?