to!() conversion between objects
Piotr Szturmaj
bncrbme at jadamspam.pl
Thu Oct 20 03:43:21 PDT 2011
bearophile wrote:
> Piotr Szturmaj:
>
>> -- for CSV:
>>
>> alias Tuple!(int, string, int) IdNameAge;
>>
>> foreach (csvLine; csvFile.byCSVLine)
>> {
>> auto line = to!IdNameAge(splitter(csvLine, ';'));
>> // line here is a tuple converted from runtime csv fields
>> }
>
> See here the answer 23 by Andrei Alexandrescu to a sub-request of mine:
> http://d.puremagic.com/issues/show_bug.cgi?id=6365#c23
"Too much magic" argument is for dmd implementation, but it may be
implemented in std.conv.
More information about the Digitalmars-d
mailing list