Hrdcoded

Dennis dkorpel at gmail.com
Mon Jan 16 16:30:29 UTC 2023


On Monday, 16 January 2023 at 15:49:27 UTC, aerto wrote:
> The readUint_test its working while the readUint not.

The compiler currently doesn't determine that 
`readPos..readPos+4` has length 4, so it doesn't like the static 
array cast. You can do this instead:

```
littleEndianToNative!uint(cast(ubyte[uint.sizeof])buffer[readPos..$][0..uint.sizeof]);
```


More information about the Digitalmars-d mailing list