Regardless of all this, cast(char *)buffer is *not* recommended D code, and will likely fail in some future 2.x version of the compiler.
I'm pretty sure I learned of this trick from reading some Phobos code. Perhaps this behavior was implemented before the .ptr property for dynamic arrays?
-- Best regards, Vladimir mailto:[email protected]
