◆ parseSeqOr() [2/2]
Parse a heterogeneous sequence of records if they exist, return fallbacks for those which don't.
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.parseSeq<int>({"A", "B", "C"});
// Heterogeneous records
auto tuple = h.parseSeq(as<int>("INT"), as<float>("FLOAT"));
Example usages with fallbacks: // std::vector to std::vector
auto vector = h.parseSeqOr(fallbacks);
// RecordVec to RecordVec
auto recVec = h.parseSeqOr(fallbacks);
// std::tuple to std::tuple
auto tuple = h.parseSeqOr(fallbacks);
// Variadic to std::tuple
auto tuple = h.parseSeqOr(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) |