std.allocator ready for some abuse

Lionello Lunesu lionello at lunesu.remove.com
Thu Oct 31 08:57:26 PDT 2013


On 10/27/13, 7:10, Andrei Alexandrescu wrote:
>> The second problem is that the logged file/line is always in
>> std.allocator.d. It's probably not easy to get this working in all
>> cases (especially regarding polymorphism).
>
> Uhm, that /is/ a problem.

This is supported by using default values:

1:import std.stdio;
2:void w(int l = __LINE__){writeln(l);}
3:void main(){w();}

outputs:
3

By design :)


More information about the Digitalmars-d mailing list