to!() conversion between objects

bearophile bearophileHUGS at lycos.com
Thu Oct 20 03:10:32 PDT 2011


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

Bye,
bearophile


More information about the Digitalmars-d mailing list