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

Andrej Mitrovic andrej.mitrovich at gmail.com
Sat Mar 22 06:39:47 PDT 2014


On 3/22/14, "Nordlöw" <per.nordlow at gmail.com> wrote:
> DMD currently cannot infer aliases to be callable using UCFS
> unfortunately

Actually you're running into UFCS not working for module-scoped
imports. The following will work:

-----
import std.stdio: wln = writeln;
import std.string;
alias toStringz z;

void main()
{
    wln(typeof("a".z).stringof);  // works ok
}
-----

UFCS not working for module-scoped imports is a filed bug.



More information about the Digitalmars-d mailing list