parse typed csv file with boost::spirit::qi
问题 I want to parse a CSV-File with typed values. The type of every column is defined in the header, e.x.: int double double int unsigned 12 1.3 23445 1 42 45 46 47 48 49 The result data structure may be something like this 2-dimensional vector: using ColumnType = boost::variant< std::vector<int>, std::vector<unsigned>, std::vector<double> >; using ResultType = std::vector<ColumnType>; My working code: namespace phoenix = boost::phoenix; namespace qi = boost::spirit::qi; namespace ascii = boost: