https://issues.dlang.org/show_bug.cgi?id=16207
Issue ID: 16207
Summary: CTFE cast from void* to ubyte* doesn't work
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
int hashOf( const(void)[] buf )
{
auto data = cast(const(ubyte)*) buf.ptr;
return 3;
}
enum hashval = hashOf("Sample_string");
-------------------------
bug.d(4): Error: pointer cast from const(void)* to const(ubyte)* is not
supported at compile time
bug.d(8): called from here: hashOf("Sample_string")
--