File tree Expand file tree Collapse file tree 3 files changed +9
-0
lines changed
libcxx/test/benchmarks/algorithms/modifying Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 1717
1818#include " benchmark/benchmark.h"
1919#include " ../../GenerateInput.h"
20+ #include " test_macros.h"
2021
2122template <class Container , class Operation >
2223void bm_general (std::string operation_name, Operation copy) {
@@ -74,8 +75,10 @@ int main(int argc, char** argv) {
7475 bm_general<std::vector<int >>(" ranges::copy(vector<int>)" , ranges_copy);
7576 bm_general<std::deque<int >>(" ranges::copy(deque<int>)" , ranges_copy);
7677 bm_general<std::list<int >>(" ranges::copy(list<int>)" , ranges_copy);
78+ #if TEST_STD_VER >= 23 // vector<bool>::iterator is not an output_iterator before C++23
7779 bm_vector_bool<true >(" ranges::copy(vector<bool>) (aligned)" , ranges_copy);
7880 bm_vector_bool<false >(" ranges::copy(vector<bool>) (unaligned)" , ranges_copy);
81+ #endif
7982
8083 benchmark::Initialize (&argc, argv);
8184 benchmark::RunSpecifiedBenchmarks ();
Original file line number Diff line number Diff line change 1717
1818#include " benchmark/benchmark.h"
1919#include " ../../GenerateInput.h"
20+ #include " test_macros.h"
2021
2122template <class Container , class Operation >
2223void bm_general (std::string operation_name, Operation copy_backward) {
@@ -76,8 +77,10 @@ int main(int argc, char** argv) {
7677 bm_general<std::vector<int >>(" ranges::copy_backward(vector<int>)" , ranges_copy_backward);
7778 bm_general<std::deque<int >>(" ranges::copy_backward(deque<int>)" , ranges_copy_backward);
7879 bm_general<std::list<int >>(" ranges::copy_backward(list<int>)" , ranges_copy_backward);
80+ #if TEST_STD_VER >= 23 // vector<bool>::iterator is not an output_iterator before C++23
7981 bm_vector_bool<true >(" ranges::copy_backward(vector<bool>) (aligned)" , ranges_copy_backward);
8082 bm_vector_bool<false >(" ranges::copy_backward(vector<bool>) (unaligned)" , ranges_copy_backward);
83+ #endif
8184
8285 benchmark::Initialize (&argc, argv);
8386 benchmark::RunSpecifiedBenchmarks ();
Original file line number Diff line number Diff line change 1717
1818#include " benchmark/benchmark.h"
1919#include " ../../GenerateInput.h"
20+ #include " test_macros.h"
2021
2122template <class Container , class Operation >
2223void bm_general (std::string operation_name, Operation copy_n) {
@@ -73,8 +74,10 @@ int main(int argc, char** argv) {
7374 bm_general<std::vector<int >>(" ranges::copy_n(vector<int>)" , ranges_copy_n);
7475 bm_general<std::deque<int >>(" ranges::copy_n(deque<int>)" , ranges_copy_n);
7576 bm_general<std::list<int >>(" ranges::copy_n(list<int>)" , ranges_copy_n);
77+ #if TEST_STD_VER >= 23 // vector<bool>::iterator is not an output_iterator before C++23
7678 bm_vector_bool<true >(" ranges::copy_n(vector<bool>) (aligned)" , ranges_copy_n);
7779 bm_vector_bool<false >(" ranges::copy_n(vector<bool>) (unaligned)" , ranges_copy_n);
80+ #endif
7881
7982 benchmark::Initialize (&argc, argv);
8083 benchmark::RunSpecifiedBenchmarks ();
You can’t perform that action at this time.
0 commit comments