diff options
Diffstat (limited to 'cli-tests/position')
-rw-r--r-- | cli-tests/position/driver.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/cli-tests/position/driver.cxx b/cli-tests/position/driver.cxx index 77b9a8d..eebb5d0 100644 --- a/cli-tests/position/driver.cxx +++ b/cli-tests/position/driver.cxx @@ -27,7 +27,13 @@ main (int argc, char* argv[]) } while (scan.more ()) - cout << scan.position () << ": " << scan.next () << endl; + { + // Note that calling position() inside `cout << ...` depends on order of + // argument evaluation. + // + size_t p (scan.position ()); + cout << p << ": " << scan.next () << endl; + } cout << "max: " << scan.position () << endl; } |