@@ -69,7 +69,7 @@ static void run_default(benchmark::State& state, Func func, Args... args) {
6969 env.mem_resource = &new_delete_resource;
7070
7171 const auto input = make_random_input (1 , state.range (0 ));
72- for (auto _ : state) {
72+ for ([[maybe_unused]] auto _ : state) {
7373 auto result = func (env, input, args...);
7474 benchmark::DoNotOptimize (result);
7575 }
@@ -86,7 +86,7 @@ static void run_cached(benchmark::State& state, Func func, Args... args) {
8686 env.cache = cache.get ();
8787
8888 const auto input = make_random_input (1 , state.range (0 ));
89- for (auto _ : state) {
89+ for ([[maybe_unused]] auto _ : state) {
9090 auto result = func (env, input, args...);
9191 benchmark::DoNotOptimize (result);
9292 }
@@ -100,7 +100,7 @@ static void run_monotonic(benchmark::State& state, Func func, Args... args) {
100100 AllocationCounter new_delete_resource{std::pmr::new_delete_resource ()};
101101
102102 const auto input = make_random_input (1 , state.range (0 ));
103- for (auto _ : state) {
103+ for ([[maybe_unused]] auto _ : state) {
104104 state.PauseTiming ();
105105 std::pmr::monotonic_buffer_resource buffer_resource{
106106 buffer.data (), buffer.size (), &new_delete_resource
@@ -128,7 +128,7 @@ static void run_pool(benchmark::State& state, Func func, Args... args) {
128128 env.mem_resource = &pool_resource;
129129
130130 const auto input = make_random_input (1 , state.range (0 ));
131- for (auto _ : state) {
131+ for ([[maybe_unused]] auto _ : state) {
132132 auto result = func (env, input, args...);
133133 benchmark::DoNotOptimize (result);
134134 }
0 commit comments