◆ parse_n() [2/2]
Parse a sequence of heterogeneous records.
Like for single record reading, there are two ways to parse a sequence of records: with or without fallbacks. For each record to be parsed, if the specified keyword is not found in the header, the fallback is returned. When working with fallbacks, the return type is the same as the type of Example usages without fallbacks: // Homogeneous records
auto vector = h.parse_n<int>({"A", "B", "C"});
// Heterogeneous records
auto tuple = h.parse_n(as<int>("INT"), as<float>("FLOAT"));
Example usages with fallbacks: // std::vector to std::vector
auto vector = h.parse_n_or(fallbacks);
// RecordVec to RecordVec
auto rec_vec = h.parse_n_or(fallbacks);
// std::tuple to std::tuple
auto tuple = h.parse_n_or(fallbacks);
// Variadic to std::tuple
auto tuple = h.parse_n_or(Record<int>("INT", 0), Record<float>("FLOAT", 3.14));
RecordVec< VariantValue > RecordSeq A sequence of records of any type. Definition: RecordVec.h:126 T make_tuple(T... args) |