From fd05132e5a5f34046536ef62ba8d130fa3b00c65 Mon Sep 17 00:00:00 2001 From: practicalswift Date: Mon, 31 Jul 2017 20:15:48 +0200 Subject: [PATCH] Restore default format state of cout after printing with std::fixed/setprecision --- src/bench/bench.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bench/bench.cpp b/src/bench/bench.cpp index 33631d2d150..f424572913f 100644 --- a/src/bench/bench.cpp +++ b/src/bench/bench.cpp @@ -100,6 +100,7 @@ bool benchmark::State::KeepRunning() int64_t averageCycles = (nowCycles-beginCycles)/count; std::cout << std::fixed << std::setprecision(15) << name << "," << count << "," << minTime << "," << maxTime << "," << average << "," << minCycles << "," << maxCycles << "," << averageCycles << "\n"; + std::cout.copyfmt(std::ios(nullptr)); return false; }