catch3
Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.
Clonegit clone https://git.progmasoft.com/catch3
Fixup missing transitive includes
- Commit
b824d06844ab3faf4ddffa036a0ea7ef0eec117b- Author
- Martin Hořeňovský ·
- Parents
e7aa432850c3
Changes
src/catch2/benchmark/detail/catch_stats.cpp | 1 + src/catch2/catch_session.cpp | 1 + src/catch2/interfaces/catch_interfaces_reporter.hpp | 5 +++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/catch2/benchmark/detail/catch_stats.cpp b/src/catch2/benchmark/detail/catch_stats.cpp index c583f70c..fc9c8e25 100644 --- a/src/catch2/benchmark/detail/catch_stats.cpp +++ b/src/catch2/benchmark/detail/catch_stats.cpp @@ -13,6 +13,7 @@ #include <catch2/internal/catch_compiler_capabilities.hpp> #include <cassert> +#include <iterator> #include <random> diff --git a/src/catch2/catch_session.cpp b/src/catch2/catch_session.cpp index 05cf6bd1..d163aaf8 100644 --- a/src/catch2/catch_session.cpp +++ b/src/catch2/catch_session.cpp @@ -21,6 +21,7 @@ #include <catch2/internal/catch_windows_h_proxy.hpp> #include <catch2/reporters/catch_reporter_listening.hpp> +#include <algorithm> #include <iomanip> #include <set> diff --git a/src/catch2/interfaces/catch_interfaces_reporter.hpp b/src/catch2/interfaces/catch_interfaces_reporter.hpp index 4d424c03..a8cbbb5d 100644 --- a/src/catch2/interfaces/catch_interfaces_reporter.hpp +++ b/src/catch2/interfaces/catch_interfaces_reporter.hpp @@ -25,7 +25,6 @@ #include <vector> #include <iosfwd> #include <map> -#include <algorithm> namespace Catch { @@ -164,7 +163,9 @@ namespace Catch { operator BenchmarkStats<Duration2>() const { std::vector<Duration2> samples2; samples2.reserve(samples.size()); - std::transform(samples.begin(), samples.end(), std::back_inserter(samples2), [](Duration d) { return Duration2(d); }); + for (auto const& sample : samples) { + samples2.push_back(Duration2(sample)); + } return { info, std::move(samples2),