[Proposal] Add module for C-strings support in Phobos

"Nordlöw" per.nordlow at gmail.com
Sat Mar 22 05:59:16 PDT 2014


> You could also write:
>
> alias toStringz z;
>
> auto foo = "bar".z;
>
> and that would work too!

DMD currently cannot infer aliases to be callable using UCFS 
unfortunately:

#!/usr/bin/env rdmd-dev-module

unittest {
     import std.stdio: wln = writeln;
     import std.string;
     wln(typeof("a".z).stringof);
}

errors with

t_string.d(19,19): Error: no property 'z' for type 'string'

Shouldn't be to hard to fix, though.


More information about the Digitalmars-d mailing list