How to convert ubyte[] to uint?

Dr.No jckj33 at
Wed May 23 19:36:07 UTC 2018

read fails with both uint and ulong on 64bit platform:

  Error: template cannot deduce function from 
argument types !(ulong)(ubyte[8]), candidates are:
C:\ldc2-1.9.0-windows-x64\bin\..\import\std\bitmanip.d(3213,3):, Endian endianness = Endian.bigEndian, 
R)(ref R range) if (canSwapEndianness!T && isInputRange!R && 
is(ElementType!R : const(ubyte)))


		import digestx.fnv;
		import std.bitmanip : read;
		FNV64 fnv64;
		ubyte[8] arr = fnv64.finish();
		auto h =!ulong;
		return cast(uint)h;

More information about the Digitalmars-d-learn mailing list