std.mmfile: void[] opSlice(), ubyte opIndex() inconsistent type?

mw mingwu at gmail.com
Sat Oct 8 20:50:10 UTC 2022


Hi,

I noticed:


https://dlang.org/phobos/std_mmfile.html

```
void[] opSlice();
Returns entire file contents as an array.

void[] opSlice(ulong i1, ulong i2);
Returns slice of file contents as an array.

ubyte opIndex(ulong i);
Returns byte at index i in file.
```

Should the type of opSlice() be ubyte to be consistent as 
opIndex()?





More information about the Digitalmars-d mailing list