Hrdcoded

aerto cvsae at gmx.com
Mon Jan 16 19:15:53 UTC 2023


On Monday, 16 January 2023 at 16:30:29 UTC, Dennis wrote:
> 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]);
> ```

ohh. Thank you very much.


More information about the Digitalmars-d mailing list