onArrayCastError

private fnvoid onArrayCastError()(string fromType, size_t fromSize, size_t fromLength, string toType, size_t toElemSize) @trusted

Used by __ArrayCast to emit a descriptive error message.

It is a template so it can be used by __ArrayCast in -betterC builds. It is separate from __ArrayCast to minimize code bloat.

Parameters

fromTypename of the type being cast from
fromSizetotal size in bytes of the array being cast from
fromLengthlength of array being cast from
toTypename of the type being cast to
toElemSizeelement size of array being cast to