Why invariants in D 2.0 std.string?

Janice Caron caron800 at googlemail.com
Wed Oct 31 15:05:52 PDT 2007


On 10/31/07, Janice Caron <caron800 at googlemail.com> wrote:
> Possibly, but I believe the new correct way is:
>     string foo = assumeUnique(std.file.read(filename));

Actually that probably won't work because read() returns void[], not
string. But this should:
    string foo = cast(string)(std.file.read(filename));



More information about the Digitalmars-d mailing list