Do you mean the:
1 2 3
|
std::vector<double> row;
for (double val; iss >> val; row.emplace_back(val), iss.ignore());
array.emplace_back(row);
|
Lets break it into peaces:
1 2 3 4 5 6 7 8 9
|
std::vector<double> row;
for (
double val; // init
iss >> val; // condition
row.emplace_back(val), iss.ignore() // increment
)
; // empty statement
array.emplace_back(row);
|
A for loop has init, condition, and increment statements and a body that is executed on every iteration.
In this case the body is just
;
. It could have been written
{}
The init is simple, variable 'val' is created before loop really begins.
The condition has "side-effect". It reads a number from stream 'iss' into 'val'. The actual condition is true, if that read succeeds.
The "increment" has two unrelated statements separated by comma-operator:
1 2
|
row.emplace_back(val)
iss.ignore()
|
Neither increments any loop counter. The first adds 'val' to 'row'.
The second used istream::ignore()
http://www.cplusplus.com/reference/istream/istream/ignore/
The function call relies on default values of function parameters. Like one would have written:
iss.ignore( 1, EOF )
That call reads (and discards) at most one character from 'iss'. Reads the comma.
Finally, the line 21 after the loop adds 'row' to 'array'.