We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 61f570e commit b7b8c9aCopy full SHA for b7b8c9a
include/benchmark/benchmark_api.h
@@ -709,8 +709,12 @@ class Fixture: public internal::Benchmark {
709
this->TearDown(st);
710
}
711
712
+ // These will be deprecated ...
713
virtual void SetUp(const State&) {}
714
virtual void TearDown(const State&) {}
715
+ // ... In favor of these.
716
+ virtual void SetUp(State& st) { SetUp(static_cast<State const&>(st)); }
717
+ virtual void TearDown(State& st) { TearDown(static_cast<State const&>(st)); }
718
719
protected:
720
virtual void BenchmarkCase(State&) = 0;
0 commit comments