On Thursday, 3 September 2015 at 14:36:12 UTC, Mike Parker wrote:

immutable(T)[] getGetData(T)() {
    return cast(immutable(T)[])data;
}


Absolutely, instead of returning raw void[] and allow user to cast it, std.mmfile should implement template function to return desired type. This would allow all necessary checks inside the module, returning pure result.

Reply via email to