Users create instances using the StreamOf<T>(range) non-member factory function (defined below). The following is a typical usage of this class in a range-for loop.
auto row_range = ...
using RowType = std::tuple<std::int64_t, std::string, bool>;
for (auto const& row : StreamOf<RowType>(row_range)) {
if (!row) {
// Handle error;
}
std::int64_t x = std::get<0>(*row);
...
}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-02 UTC."],[[["This webpage provides documentation for the `TupleStream` class in the Google Cloud Spanner C++ library, covering multiple versions."],["The latest release candidate version is 2.37.0-rc, while 2.22.1 is the version shown in the example usage."],["`TupleStream\u003cTuple\u003e` defines a range that parses `Tuple` objects from `RowStreamIterator`s."],["The class is used to create a range-for loop to iterate through rows, with error handling included."],["`TupleStream` uses `TupleStreamIterator` as its iterator type and is a range defined by two iterator objects, and its stream name does not refer to I/O streams library."]]],[]]