From 50fee01e3d3a34b4c16d54fd7d95e8af1e978f3e Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Wed, 9 Aug 2017 11:52:02 +0200 Subject: [PATCH] Merge #10963: [bench] Restore format state of cout after printing with std::fixed/setprecision fd05132e5 Restore default format state of cout after printing with std::fixed/setprecision (practicalswift) Pull request description: Restore default format state of `std::cout` after printing with `std::fixed`/`std::setprecision`. Tree-SHA512: 445b5b42aff58e2350939e8febc9b4a6fff478616abfe831aec42bee906cefac7a153c93d506407fb213d04dae9c7afbb5bfd344be63ca0f40ae39b331a4144f --- src/bench/bench.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bench/bench.cpp b/src/bench/bench.cpp index e5fa66890..49bfbe1bb 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; }