From 4f0de7bbadc601a3c8a4457251d934213e61e902 Mon Sep 17 00:00:00 2001 From: cericks0n <57272211+cericks0n@users.noreply.github.com> Date: Fri, 1 Nov 2019 15:52:38 -0500 Subject: [PATCH] Fix error when period of steady_clock is not nano On systems where std::chrono::steady_clock::period is not std::nano, benchmark tests fail to compile due to trying to convert analysis.samples from a vector of duration to a vector of std::chrono::duration. --- src/catch2/benchmark/catch_benchmark.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/catch2/benchmark/catch_benchmark.hpp b/src/catch2/benchmark/catch_benchmark.hpp index aef42c90..a6ffcf7c 100644 --- a/src/catch2/benchmark/catch_benchmark.hpp +++ b/src/catch2/benchmark/catch_benchmark.hpp @@ -79,7 +79,7 @@ namespace Catch { }); auto analysis = Detail::analyse(*cfg, env, samples.begin(), samples.end()); - BenchmarkStats> stats{ info, analysis.samples, analysis.mean, analysis.standard_deviation, analysis.outliers, analysis.outlier_variance }; + BenchmarkStats> stats{ info, analysis.samples, analysis.mean, analysis.standard_deviation, analysis.outliers, analysis.outlier_variance }; getResultCapture().benchmarkEnded(stats); } CATCH_CATCH_ALL{