Make function alias

Andrey saasecondbox at yandex.ru
Mon Aug 20 13:22:02 UTC 2018


On Monday, 20 August 2018 at 13:14:14 UTC, Andrey wrote:
Mistake... this is:
>static void log(bool newline = true)(string text)
>{
>    alias print(T...) = newline ? &writeln : &write;
> 
>    _file.print(text);
>    text.print();
>}





More information about the Digitalmars-d-learn mailing list