Can I work out error: reinterpreting cast from const(ubyte)* to const(uint)* is not supported in CTFE?

Dr.No jckj33 at gmail.com
Mon May 21 18:13:26 UTC 2018


I'm trying to do some hashing at compile time with xxhash 
algorithm but I get this error:

..\..\..\AppData\Local\dub\packages\xxhash-master\xxhash\src\xxhash.d(39,37): Error: reinterpreting cast from const(ubyte)* to const(uint)* is not supported in CTFE

this is line 39 
(https://github.com/repeatedly/xxhash-d/blob/master/src/xxhash.d#L39):

> auto srcPtr = cast(const(uint)*)source.ptr;

I'm on Windows 10 64-bit machine.


More information about the Digitalmars-d-learn mailing list