Commit 2fc2ea0e by Fred Tingaud Committed by Dominic Hamon

Correct typo in sample code for range-based for loop. (#458)

parent cacd3218
...@@ -200,11 +200,12 @@ In C++11 mode, a ranged-based for loop should be used in preference to ...@@ -200,11 +200,12 @@ In C++11 mode, a ranged-based for loop should be used in preference to
the `KeepRunning` loop for running the benchmarks. For example: the `KeepRunning` loop for running the benchmarks. For example:
```c++ ```c++
static void BM_Faste(benchmark::State &st) { static void BM_Fast(benchmark::State &state) {
for (auto _ : state) { for (auto _ : state) {
FastOperation(); FastOperation();
} }
} }
BENCHMARK(BM_Fast);
``` ```
The reason the ranged-based for loop is faster than using `KeepRunning`, is The reason the ranged-based for loop is faster than using `KeepRunning`, is
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment